MatchFlowSystem.ixx File
System that drives the match state flow automatically. More...
Included Headers
#include <helios.engine.runtime>
#include <helios.engine.state.types.StateTransitionRequest>
#include <helios.engine.state.commands>
#include <helios.engine.mechanics.match.types.MatchStateTransitionId>
#include <helios.engine.mechanics.match.types.MatchState>
#include <helios.engine.common.tags.SystemRole>
#include <helios.engine.ecs>
#include <helios.engine.runtime.messaging.command.EngineCommandBuffer>
#include <helios.engine.state.types>
#include <helios.engine.state.Bindings>
#include <helios.engine.mechanics.gamestate.types>
#include <helios.engine.mechanics.match.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 | match |
|
Match state management for the helios engine. More... | |
| namespace | systems |
|
Systems for match state management. More... | |
Classes Index
| class | MatchFlowSystem |
|
Automatically advances the match through its state phases. More... | |
Description
System that drives the match state flow automatically.
File Listing
The file content with the documentation metadata removed is:
26using namespace helios::engine::state::commands;
27using namespace helios::engine::state::types;
28using namespace helios::engine::mechanics::gamestate;
29using namespace helios::engine::mechanics::match::types;
33export namespace helios::engine::mechanics::match::systems {
42 class MatchFlowSystem {
44 MatchState prevMatchState_ = MatchState::Undefined;
45 StateTransitionIdType<MatchState> prevMatchStateTransitionId_ = StateTransitionIdType<MatchState>::Undefined;
57 void update(helios::engine::runtime::world::UpdateContext& updateContext) noexcept {
61 const auto matchState = session.state<MatchState>();
62 auto matchStateTransitionId = session.stateTransitionId<MatchState>();
64 if (matchState != MatchState::Undefined && prevMatchState_ == matchState && prevMatchStateTransitionId_ == matchStateTransitionId) {
74 case MatchState::Undefined: {
75 updateContext.queueCommand<StateCommand<MatchState>>(
81 case MatchState::Warmup: {
82 updateContext.queueCommand<StateCommand<MatchState>>(
88 case MatchState::Start: {
89 updateContext.queueCommand<StateCommand<MatchState>>(
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.