Skip to main content

DefaultGameStateTransitionRules Class

Provides the default set of game state transition rules. More...

Declaration

class helios::engine::mechanics::gamestate::rules::DefaultGameStateTransitionRules { ... }

Public Static Functions Index

static std::span< const StateTransitionRule< GameState > >rules ()

Returns the default transition rules. More...

Private Static Attributes Index

static constexpr StateTransitionRule< GameState >rules_[]

Description

Provides the default set of game state transition rules.

Defines standard transitions such as:

  • Undefined -> Title (on TitleRequested)
  • Title -> Running (on StartRequested)
  • Running <-> Paused (on TogglePause)
  • Paused -> Running (on RestartRequested)
  • Paused -> Title (on QuitGameRequested)

Definition at line 35 of file DefaultGameStateTransitionRules.ixx.

Public Static Functions

rules()

std::span< const StateTransitionRule< GameState > > helios::engine::mechanics::gamestate::rules::DefaultGameStateTransitionRules::rules ()
inline nodiscard static

Returns the default transition rules.

Returns

A span of the predefined transition rules.

Definition at line 111 of file DefaultGameStateTransitionRules.ixx.

111 [[nodiscard]] static std::span<const StateTransitionRule<GameState>> rules() {
112 return rules_;
113 }

Referenced by helios::engine::bootstrap::makeGameWorld.

Private Static Attributes

rules_

StateTransitionRule<GameState> helios::engine::mechanics::gamestate::rules::DefaultGameStateTransitionRules::rules_[]
constexpr static

The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.