Interface ICommands

Commands is an async interface, which aggregates commands for later execution. The primary usage is to issue commands during system runtime and have them take effect on a common sync point, like after all systems ran

Hierarchy

  • ICommands

Methods

  • Add a resource to this world and returns the resource instance

    Type Parameters

    • T extends object

    Parameters

    • type: T | TTypeProto<T>
    • Rest ...args: readonly unknown[]

      constructor parameters

    Returns T

  • Provides an environment to securely change an entity's data

    Parameters

    • entity: Readonly<IReadOnlyEntity>
    • mutator: ((entity) => void | Promise<void>)
        • (entity): void | Promise<void>
        • Parameters

          Returns void | Promise<void>

    Returns void

  • Replace a resource from this world

    Type Parameters

    • T extends object

    Parameters

    • type: T | TTypeProto<T>
    • Rest ...args: unknown[]

      constructor parameters

    Returns void

Generated using TypeDoc