Class System extends MessageDispatcher

Base class for custom systems. System is used to listen scene changes.

Methods

onUpdate() method
onUpdate
onPostUpdate() method
onPostUpdate
onRender() method
onRender
onChildrenAdded(gameObject) method

onChildrenAdded

Parameters
gameObject : GameObject — GameObject instance.
Returns
void
onChildrenRemoved(gameObject) method

onChildrenRemoved

Parameters
gameObject : GameObject — GameObject instance.
Returns
void
onChildrenChanged(gameObject) method

onChildrenRemoved

Parameters
gameObject : GameObject — GameObject instance.
Returns
void
onComponentAdded(child, component) method

onComponentAdded

Parameters
child : GameObject — GameObject instance.
component : Component — Component instance added to game object.
Returns
void
onComponentRemoved(child, component) method

onComponentRemoved

Parameters
child : GameObject — GameObject instance.
component : Component — Component instance removed from game object.
Returns
void
dispose() method
Disposes all allocated resources.

Inherited Methods

on(name, callback, context) inherited method

Adds listener by given name and callback.

Parameters
name : string — Message name.
callback : function — Function to be called on message send.
context : * — Object to be used as this in callback function.
Returns
MessageBinding
off(names) inherited method

Removes all bindings by given message name.

Parameters
names : string — One or more message name.
Returns
void
once(name, callback, context) inherited method

Adds listener by given name and callback. Binding will be automatically removed after first execution.

Parameters
name : string — Message name.
callback : function — Function to be called on message send.
context : * — Object to be used as this in callback function.
Returns
MessageBinding
post(name, params) inherited method

Posts message with a given params.

Adding ~ character to the begging of the name will bubble message to the top of the tree.

Parameters
name : string — The name of a message
params : * — A list of params to send
Returns
void

Inherited Properties

parent : MessageDispatcher | null inherited property
Returns parent MessageDispatcher.
stage : Stage | null inherited property
Returns the stage Game Object to which this belongs to or null if not added onto stage.
path : string | null inherited property
Returns string representing a url like path to this object in the display
tree.