Class EngineState

Represents a state for a SystemStateMachine. The state contains any number of SystemProviders which are used to add Systems to the Engine when this state is entered.

Hierarchy

  • EngineState

Constructors

Properties

providers: SystemProvider<any>[] = []

Methods

  • Creates a mapping for the System type to a specific System instance. A SystemInstanceProvider is used for the mapping.

    Type Parameters

    Parameters

    • system: TSystem

      The System instance to use for the mapping

    Returns StateSystemMapping<TSystem>

    This StateSystemMapping, so more modifications can be applied

  • Creates a mapping for the System type to a method call. The method should return a System instance. A DynamicSystemProvider is used for the mapping.

    Type Parameters

    Parameters

    • method: (() => TSystem)

      The method to provide the System instance.

        • (): TSystem
        • Returns TSystem

    Returns StateSystemMapping<TSystem>

    This StateSystemMapping, so more modifications can be applied.

  • Creates a mapping for the System type to a single instance of the provided type. The instance is not created until it is first requested. The type should be the same as or extend the type for this mapping. A SystemSingletonProvider is used for the mapping.

    Type Parameters

    Parameters

    • type: Class<TSystem>

      The type of the single instance to be created. If omitted, the type of the mapping is used.

    Returns StateSystemMapping<TSystem>

    This StateSystemMapping, so more modifications can be applied

Generated using TypeDoc