TimerUpdateSystem.ixx File
System that advances all game timers each frame. More...
Included Headers
#include <span>
#include <helios.engine.runtime.timing.commands>
#include <helios.engine.runtime.timing.types>
#include <helios.engine.runtime.world.tags.SystemRole>
#include <helios.engine.runtime.messaging.command.NullCommandBuffer>
#include <helios.engine.runtime.messaging.command.concepts.IsCommandBufferLike>
#include <helios.engine.runtime.world.UpdateContext>
#include <helios.engine.runtime.timing.TimerManager>
#include <helios.engine.runtime.timing.Timer>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | runtime |
| namespace | timing |
| namespace | systems |
Classes Index
| class | TimerUpdateSystem<TCommandBuffer> |
|
Updates all game timers managed by the TimerManager. More... | |
Description
System that advances all game timers each frame.
File Listing
The file content with the documentation metadata removed is:
24using namespace helios::engine::runtime::timing;
26using namespace helios::engine::runtime::timing::types;
27using namespace helios::engine::runtime::timing::commands;
28using namespace helios::engine::runtime::world;
29using namespace helios::engine::runtime::messaging::command;
32export namespace helios::engine::runtime::timing::systems {
44 requires IsCommandBufferLike<TCommandBuffer>
45 class TimerUpdateSystem {
50 TimerManager& timerManager_;
56 using CommandBuffer_type = TCommandBuffer;
64 explicit TimerUpdateSystem(TimerManager& timerManager)
65 : timerManager_(timerManager) {}
72 void update(helios::engine::runtime::world::UpdateContext& updateContext, TCommandBuffer& cmdBuffer) noexcept {
75 if (timer.state() == TimerState::Running) {
77 timer.update(updateContext.deltaTime());
80 auto context = TimerControlContext{timer.timerId(), TimerState::Finished};
81 cmdBuffer.template add<TimerControlCommand>(context);
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.