GameTimerClearSystem Class
Resets finished game timers to an undefined state. More...
Declaration
Public Member Typedefs Index
| using | EngineRoleTag = helios::engine::common::tags::SystemRole |
Public Constructors Index
| GameTimerClearSystem (TimerManager &timerManager) | |
|
Constructs the system with a reference to the TimerManager. More... | |
Public Member Functions Index
| void | update (helios::engine::runtime::world::UpdateContext &updateContext) noexcept |
|
Resets all finished timers to TimerState::Undefined. More... | |
Private Member Attributes Index
| TimerManager & | timerManager_ |
|
Reference to the TimerManager owning the timers. More... | |
Description
Resets finished game timers to an undefined state.
Each frame, this system iterates over all registered timers and resets any timer whose state is `TimerState::Finished` back to `TimerState::Undefined`. This ensures that one-shot timer completions are consumed within a single frame and do not trigger downstream logic more than once.
- See Also
- See Also
Definition at line 37 of file GameTimerClearSystem.ixx.
Public Member Typedefs
EngineRoleTag
|
Definition at line 47 of file GameTimerClearSystem.ixx.
Public Constructors
GameTimerClearSystem()
| inline explicit |
Constructs the system with a reference to the TimerManager.
- Parameters
-
timerManager The manager whose timers are cleared.
Definition at line 54 of file GameTimerClearSystem.ixx.
Public Member Functions
update()
| inline noexcept |
Resets all finished timers to TimerState::Undefined.
- Parameters
-
updateContext The current frame's update context.
Definition at line 62 of file GameTimerClearSystem.ixx.
References helios::engine::mechanics::timing::types::Cancelled, helios::engine::mechanics::timing::types::Finished and helios::engine::mechanics::timing::types::Undefined.
Private Member Attributes
timerManager_
|
Reference to the TimerManager owning the timers.
Definition at line 42 of file GameTimerClearSystem.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.