Constructor
(private) new System(name, components, handler)
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()
Remove this system from engine
getName() → {String}
Returns this system name
Returns:
this system name
- Type
- String
isCompatibleEntity(entity) → {Boolean}
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