TimerManager.ixx File
Manager for game timers and timer command handling. More...
Included Headers
#include <cassert>
#include <memory>
#include <span>
#include <vector>
#include <stdexcept>
#include <ranges>
#include <helios.engine.common>
#include <helios.core.types>
#include <helios.engine.runtime.world.UpdateContext>
#include <helios.engine.mechanics.timing.types.GameTimerId>
#include <helios.engine.mechanics.timing.GameTimer>
#include <helios.engine.mechanics.timing.commands>
#include <helios.util.Guid>
#include <helios.engine.runtime.world.GameWorld>
#include <helios.engine.mechanics.timing.types>
Namespaces Index
| namespace | helios |
| namespace | engine |
|
Main engine module aggregating core infrastructure and game systems. More... | |
| namespace | mechanics |
|
High-level gameplay systems and components for game logic. More... | |
| namespace | timing |
|
Game timer management system. More... | |
Classes Index
| class | TimerManager |
|
Manager that owns game timers and processes timer control commands. More... | |
Description
Manager for game timers and timer command handling.
File Listing
The file content with the documentation metadata removed is:
31using namespace helios::engine::mechanics::timing::commands;
32using namespace helios::engine::mechanics::timing::types;
33using namespace helios::engine::mechanics::timing::types;
34using namespace helios::engine::runtime::world;
35using namespace helios::engine::runtime::messaging::command;
37export namespace helios::engine::mechanics::timing {
50 class TimerManager {
69 [[nodiscard]] bool has(const GameTimerId timerId) noexcept {
80 GameTimer* getGameTimer(const GameTimerId timerId) {
83 [&](const auto& gameTimer) {
84 return gameTimer.gameTimerId() == timerId;
100 GameTimer& add(const GameTimerId gameTimerId) noexcept {
101 gameTimers_.emplace_back(GameTimer(gameTimerId));
118 GameTimer& addGameTimer(GameTimerId gameTimerId) noexcept {
131 [[nodiscard]] GameTimer* gameTimer(const GameTimerId gameTimerId) noexcept {
140 [[nodiscard]] std::span<GameTimer> gameTimers() noexcept {
154 helios::engine::runtime::world::UpdateContext& updateContext
158 auto* timer = gameTimer(controlContext.gameTimerId);
177 bool submit(const TimerControlCommand timerControlCommand) noexcept {
187 void init(helios::engine::runtime::world::GameWorld& gameWorld) {
195 for (auto& gameTimer : gameTimers_) {
196 gameTimer.reset();
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.