Skip to main content

TimerClearSystem.ixx File

System that resets finished game timers each frame. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine
namespaceruntime
namespacetiming
namespacesystems

Classes Index

classTimerClearSystem

Resets finished game timers to an undefined state. More...

Description

System that resets finished game timers each frame.

File Listing

The file content with the documentation metadata removed is:

1
5module;
6
7#include <span>
8
9export module helios.engine.runtime.timing.systems.TimerClearSystem;
10
11import helios.engine.runtime.timing.Timer;
12import helios.engine.runtime.timing.TimerManager;
13
14import helios.engine.runtime.world.UpdateContext;
15
16import helios.engine.runtime.world.tags.SystemRole;
17
18import helios.engine.runtime.timing.types;
19
21
23
25
39
43 TimerManager& timerManager_;
44
45 public:
46
47
49
56 : timerManager_(timerManager) {}
57
64
65 for (auto& timer : timerManager_.timers()) {
66 if (timer.state() == TimerState::Finished || timer.state() == TimerState::Cancelled) {
67 timer.setState(TimerState::Undefined);
68 }
69 }
70 }
71
72 };
73
74}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.