Skip to main content

SystemManager

The SystemManager is responsible for keeping track of all systems in a scene. Systems are scene specific

Index

Constructors

constructor

Properties

publicinitialized

initialized: boolean = false

publicsystems

systems: System[] = []

List of systems, to add a new system call [[SystemManager.addSystem]]

Methods

publicaddSystem

  • Adds a system to the manager, it will now be updated every frame


    Parameters

    Returns void

publicclear

  • clear(): void
  • Returns void

publicget

  • Get a system registered in the manager by type


    Type parameters

    Parameters

    Returns T

publicinitialize

  • initialize(): void
  • Initialize all systems in the manager

    Systems added after initialize() will be initialized on add


    Returns void

publicremoveSystem

  • removeSystem(system: System): void
  • Removes a system from the manager, it will no longer be updated


    Parameters

    Returns void

publicupdateSystems

  • updateSystems(type: SystemType, scene: Scene<unknown>, delta: number): void
  • Updates all systems


    Parameters

    • type: SystemType

      whether this is an update or draw system

    • scene: Scene<unknown>

      context reference

    • delta: number

      time in milliseconds

    Returns void