Options
All
  • Public
  • Public/Protected
  • All
Menu

Class System

Hierarchy

  • EcsySystem
    • System

Index

Constructors

constructor

  • Parameters

    Returns System

Properties

enabled

enabled: boolean

Whether the system will execute during the world tick.

Readonly priority

priority: number

Execution priority (i.e: order) of the system.

queries

queries: {}

The results of the queries. Should be used inside of execute.

Type declaration

  • [queryName: string]: { added?: EntityType[]; changed?: EntityType[]; removed?: EntityType[]; results: EntityType[] }
    • Optional added?: EntityType[]
    • Optional changed?: EntityType[]
    • Optional removed?: EntityType[]
    • results: EntityType[]

world

world: World<EntityType>

Static isSystem

isSystem: true

Static queries

queries: SystemQueries

Defines what Components the System will query for. This needs to be user defined.

Methods

dispose

  • dispose(): void
  • Should be called before the system is unregistered

    Returns void

Abstract execute

  • execute(delta: number, time: number): void
  • This function is called for each run of world. All of the queries defined on the class are available here.

    Parameters

    • delta: number
    • time: number

    Returns void

init

  • init(attributes?: Attributes): void
  • Called when the system is added to the world.

    Parameters

    • Optional attributes: Attributes

    Returns void

play

  • play(): void
  • Resume execution of this system.

    Returns void

reinit

  • reinit(): void
  • Should be called after the system is re-registered

    Returns void

stop

  • stop(): void
  • Stop execution of this system.

    Returns void

Generated using TypeDoc