Class SystemManager<R>

The SystemManager is a class that provides functions for managing a set of systems This is a base class, that is generic (no render code or knowledge at all)

Memberof

PIXI

Type Parameters

Hierarchy (view full)

Constructors

Properties

runners: {
    [key: string]: Runner;
}

a collection of runners defined by the user

Type declaration

prefixed: string | boolean

Methods

  • Type Parameters

    • T extends string | symbol

    Parameters

    • event: T
    • fn: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns this

  • Create a bunch of runners based of a collection of ids

    Parameters

    • Rest ...runnerIds: string[]

      the runner ids to add

    Returns void

  • Add a new system to the renderer.

    Parameters

    • ClassRef: ISystemConstructor<R>

      Class reference

    • name: string

      Property name for system, if not specified will use a static name property on the class itself. This name will be assigned as s property on the Renderer so make sure it doesn't collide with properties on Renderer.

    Returns this

    Return instance of renderer

  • destroy the all runners and systems. Its apps job to

    Returns void

  • Calls each of the listeners registered for a given event.

    Type Parameters

    • T extends string | symbol

    Parameters

    • event: T
    • Rest ...args: any[]

    Returns boolean

  • A function that will run a runner and call the runners function but pass in different options to each system based on there name.

    E.g. If you have two systems added called systemA and systemB you could call do the following:

    system.emitWithCustomOptions(init, {
    systemA: {...optionsForA},
    systemB: {...optionsForB},
    });

    init would be called on system A passing optionsForA and on system B passing optionsForB.

    Parameters

    • runner: Runner<any, any[]>

      the runner to target

    • options: Record<string, unknown>

      key value options for each system

    Returns void

  • Return an array listing the events for which the emitter has registered listeners.

    Returns (string | symbol)[]

  • Return the number of listeners listening to a given event.

    Parameters

    • event: string | symbol

    Returns number

  • Return the listeners registered for a given event.

    Type Parameters

    • T extends string | symbol

    Parameters

    • event: T

    Returns ((...args) => void)[]

  • Type Parameters

    • T extends string | symbol

    Parameters

    • event: T
    • Optional fn: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any
    • Optional once: boolean

    Returns this

  • Add a listener for a given event.

    Type Parameters

    • T extends string | symbol

    Parameters

    • event: T
    • fn: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns this

  • Add a one-time listener for a given event.

    Type Parameters

    • T extends string | symbol

    Parameters

    • event: T
    • fn: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns this

  • Remove all listeners, or those of the specified event.

    Parameters

    • Optional event: string | symbol

    Returns this

  • Remove the listeners of a given event.

    Type Parameters

    • T extends string | symbol

    Parameters

    • event: T
    • Optional fn: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any
    • Optional once: boolean

    Returns this

  • Set up a system with a collection of SystemClasses and runners. Systems are attached dynamically to this class when added.

    Parameters

    • config: ISystemConfig<R>

      the config for the system manager

    Returns void

Generated using TypeDoc