Class EngineStateMachine

This is a state machine for the Engine. The state machine manages a set of states, each of which has a set of System providers. When the state machine changes the state, it removes Systems associated with the previous state and adds Systems associated with the new state.

Hierarchy

  • EngineStateMachine

Constructors

Properties

engine: Engine

Methods

  • Change to a new state. The Systems from the old state will be removed and the Systems for the new state will be added.

    Parameters

    • name: string

      The name of the state to change to.

    Returns void

  • Create a new state in this state machine.

    Parameters

    • name: string

      The name of the new state - used to identify it later in the changeState method call.

    Returns EngineState

    The new EntityState object that is the state. This will need to be configured with the appropriate component providers.

Generated using TypeDoc