System

system~ System

The system class. To create a new system, use the Engine.system() method.

Constructor

(private) new System(name, components, handler)

Source:

Do not instantiate this class directly, use the Engine.system() method.

Parameters:
Name Type Description
name String

Name of the system

components Array.<String>

Array of component names this system operates on

handler function

System function

Extends

  • EventEmitter

Methods

destroy()

Source:

Remove this system from engine

getName() → {String}

Source:

Returns this system name

Returns:

this system name

Type
String

isCompatibleEntity(entity) → {Boolean}

Source:

Check if the entity is associated to every component this system require.

Parameters:
Name Type Description
entity Entity

Entity object

Returns:

true if the entity is compatible, false otherwise.

Type
Boolean