EngineFlowSystem.ixx File
System that drives the high-level game state flow. More...
Included Headers
#include <helios.engine.runtime.world.tags.SystemRole>
#include <helios.engine.runtime.world.Session>
#include <helios.ecs>
#include <helios.engine.runtime.enginestate.types>
#include <helios.engine.runtime.enginestate.EngineStateBindings>
#include <helios.engine.state.types.StateTransitionId>
#include <helios.engine.runtime.world.UpdateContext>
#include <helios.engine.state.types.StateTransitionRequest>
#include <helios.engine.state.commands>
#include <helios.engine.runtime.messaging.command.concepts>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | runtime |
| namespace | enginestate |
| namespace | systems |
Classes Index
| class | EngineFlowSystem<TCommandBuffer> |
|
System that drives automatic game state transitions. More... | |
Description
System that drives the high-level game state flow.
File Listing
The file content with the documentation metadata removed is:
26using namespace helios::engine::state::commands;
28using namespace helios::engine::state::types;
29using namespace helios::engine::runtime::enginestate;
30using namespace helios::engine::runtime::enginestate::types;
31export namespace helios::engine::runtime::enginestate::systems {
47 requires IsCommandBufferLike<TCommandBuffer>
48 class EngineFlowSystem {
53 EngineState prevMatchState_ = EngineState::Undefined;
58 StateTransitionIdType<EngineState> prevEngineStateTransitionId_ = StateTransitionIdType<EngineState>::Undefined;
64 using CommandBuffer_type = TCommandBuffer;
75 void update(helios::engine::runtime::world::UpdateContext& updateContext, TCommandBuffer& buffer) noexcept {
77 auto& session = updateContext.session();
79 const auto engineState = session.state<EngineState>();
80 auto engineStateTransitionId = session.stateTransitionId<EngineState>();
86 if (engineState == EngineState::Undefined) {// && prevMatchState_ == engineState && prevEngineStateTransitionId_ == engineStateTransitionId) {
90 prevMatchState_= engineState;
91 prevEngineStateTransitionId_ = engineStateTransitionId;
93 switch (engineState) {
95 buffer.template add<StateCommand<EngineState>>(
96 StateTransitionRequest<EngineState>(engineState, EngineStateTransitionId::BootRequest)
102 buffer.template add<StateCommand<EngineState>>(
103 StateTransitionRequest<EngineState>(engineState, EngineStateTransitionId::WarmupRequest)
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.