GameFlowSystem Class
System that drives automatic game state transitions. More...
Declaration
Public Member Typedefs Index
| using | EngineRoleTag = helios::engine::common::tags::SystemRole |
Public Member Functions Index
| void | update (helios::engine::runtime::world::UpdateContext &updateContext) noexcept |
|
Updates the game flow and emits state transition commands. More... | |
Private Member Attributes Index
| GameState | prevMatchState_ = GameState::Undefined |
|
The previously observed game state. More... | |
| StateTransitionIdType< GameState > | prevGameStateTransitionId_ = StateTransitionIdType<GameState>::Undefined |
|
The previously observed state transition ID. More... | |
Description
System that drives automatic game state transitions.
GameFlowSystem monitors the current GameState and issues StateCommands to advance the state machine when appropriate. It tracks the previous state and transition ID to avoid emitting duplicate commands.
Typical flow: Undefined -> Start -> Title.
- See Also
- See Also
- See Also
Definition at line 44 of file GameFlowSystem.ixx.
Public Member Typedefs
EngineRoleTag
|
Definition at line 58 of file GameFlowSystem.ixx.
Public Member Functions
update()
| inline noexcept |
Updates the game flow and emits state transition commands.
Checks the current GameState from the session and compares it with the previously observed state. If a transition is required, a StateCommand is added to the command buffer.
- Parameters
-
updateContext The update context providing session and command buffer access.
Definition at line 69 of file GameFlowSystem.ixx.
References helios::engine::mechanics::gamestate::types::Booted, helios::engine::mechanics::gamestate::types::BootRequest, helios::engine::mechanics::gamestate::types::MatchReady, helios::engine::mechanics::gamestate::types::StartMatchRequest, helios::engine::mechanics::gamestate::types::TitleRequest and helios::engine::mechanics::gamestate::types::Undefined.
Private Member Attributes
prevGameStateTransitionId_
|
The previously observed state transition ID.
Definition at line 54 of file GameFlowSystem.ixx.
prevMatchState_
|
The previously observed game state.
Definition at line 49 of file GameFlowSystem.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.