Observer
Description:
A record representing an observer of entity changes in the game systems.
Class Object: Observer Class.
watch
Type: Function.
Description:
Watches the components changes to entities that match the observer's component filter.
Signature:
watch: function(self: Observer, func: function(Entity): boolean): Observer
Parameters:
Parameter | Type | Description |
---|---|---|
func | function | The function to call when a change occurs. Returns true to stop watching. |
Returns:
Return Type | Description |
---|---|
Observer | The same observer, for method chaining. |