Class InputComponent extends Component

This component will allow you to subscribe for some input messages.

Inherited Methods

onAdded(gameObject) inherited method

Called when attached to GameObject.

Parameters
gameObject : GameObject — The owner of this component.
Returns
void
onRemoved(gameObject) inherited method

Called when detached from GameObject.

Parameters
gameObject : GameObject — The owner of this component.
Returns
void
onUpdate() inherited method
Called at every update.
onRender() inherited method
Called after all updates have been executed but before DisplayObject's onRender. GameObject itself does not have onRender method so Component#onRender will not be called on GameObjects.
This method can be used to interpolate/extrapolate values when low Black#ups value is used.
removeFromParent() inherited method
Detaches this Component from its parent GameObject.
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

Properties

touchable property
Specifies whether the component is active.

Inherited Properties

gameObject : GameObject inherited property
Returns owner of this component.
parent : GameObject | null inherited property
Returns this Component owner GameObject.
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.