# Class: EntitySystem

Base class for all normal systems. An EntitySystem is intended to process entities.

see SubSystem for systems to be used on a SortedSubIteratingSystem.

# Hierarchy

# Table of contents

# Constructors

# Properties

# Methods

# Constructors

# constructor

new EntitySystem()

# Inherited from

AbstractSystem.constructor

# Properties

# engine

Readonly engine: Engine

The engine of this system.

# Inherited from

AbstractSystem.engine

# Defined in

src/core/AbstractSystem.ts:14 (opens new window)

# Methods

# getPriority

getPriority(): number

# Returns

number

The priority of the system. Do not override this!

# Inherited from

AbstractSystem.getPriority

# Defined in

src/core/AbstractSystem.ts:75 (opens new window)


# isEnabled

isEnabled(): boolean

# Returns

boolean

True if the system is enabled.

# Inherited from

AbstractSystem.isEnabled

# Defined in

src/core/AbstractSystem.ts:57 (opens new window)


# onDisable

Protected onDisable(): void

Called in two situations:

  • When the system is enabled and currently being removed from the manager
  • When the system is already added to the manager and is currently being disabled.

# Returns

void

# Inherited from

AbstractSystem.onDisable

# Defined in

src/core/AbstractSystem.ts:36 (opens new window)


# onEnable

Protected onEnable(): void

Called in two situations:

  • When the system is enabled and currently being added to the manager
  • When the system is already added to the manager and is currently being enabled.

# Returns

void

# Inherited from

AbstractSystem.onEnable

# Defined in

src/core/AbstractSystem.ts:28 (opens new window)


# setEnabled

setEnabled(enabled): void

Enable or disable the system. A disabled system will not be processed during an update.

# Parameters

Name Type Description
enabled boolean The new state.

# Returns

void

# Inherited from

AbstractSystem.setEnabled

# Defined in

src/core/AbstractSystem.ts:43 (opens new window)


# setPriority

setPriority(priority): void

Set the system priority. You can set the priority with when adding the system as well.

# Parameters

Name Type Description
priority number The priority to execute this system with (lower means higher priority).

# Returns

void

# Inherited from

AbstractSystem.setPriority

# Defined in

src/core/AbstractSystem.ts:66 (opens new window)


# update

Abstract update(deltaTime): void

The update method called every tick.

# Parameters

Name Type Description
deltaTime number The time passed since last frame in seconds.

# Returns

void

# Defined in

src/core/EntitySystem.ts:14 (opens new window)