Class System<T, U>

Type Parameters

Hierarchy

  • System

Constructors

Properties

Methods

Constructors

  • Creates a new system.

    Systems are the behaviours which affect components.

    Type Parameters

    • T extends ((components: ComponentRecord, entities: Entity[], ...args: unknown[]) => ReturnType<T>)

    • U extends unknown[]

    Parameters

    • spec: SystemSpec<T, U>

      the system's specification object

    Returns System<T, U>

Properties

query: Query

The query which will provide the components and entities to the system.

system: SystemCallback<T, U>

The core function of the system. Called when this.exec is called.

Methods

  • Initialize the system for a given world

    Returns

    an initialized system function

    Parameters

    • world: World

      the world to execute the system in

    Returns ((...args: U) => ReturnType<T>)

      • (...args: U): ReturnType<T>
      • Initialize the system for a given world

        Returns

        an initialized system function

        Parameters

        • Rest ...args: U

        Returns ReturnType<T>

Generated using TypeDoc