Class R.components.input.Keyboard
Extends
R.components.Input.
A component which responds to keyboard events and notifies
its R.engine.GameObject when one of the events occurs. The R.engine.GameObject
should add event handlers for any of the following:
- keydown - A key was pressed down
- keyup - A key was released
- keypress - A key was pressed and released
Defined in: keyboard.js.
Constructor Attributes | Constructor Name and Description |
---|---|
R.components.input.Keyboard(name, priority)
Create an instance of a keyboard input component.
|
- Fields borrowed from class R.components.Base:
- TYPE_COLLIDER, TYPE_INPUT, TYPE_LOGIC, TYPE_RENDERING, TYPE_TRANSFORM
Method Attributes | Method Name and Description |
---|---|
Get the class name of this object
|
|
setHostObject(hostObj)
Deprecated in favor of #setGameObject
|
- Methods borrowed from class R.components.Base:
- execute, getGameObject, getHostObject, getPriority, getType, getTypeString, release, setGameObject, setPriority
- Methods borrowed from class R.engine.BaseObject:
- addEvent, addEvents, destroy, getElement, jQ, removeEvent, setElement, triggerEvent, update
- Methods borrowed from class R.engine.PooledObject:
- clearObjectDataModel, getId, getName, getObjectDataModel, getProperties, isDestroyed, setName, setObjectDataModel, toString, toXML
Class Detail
R.components.input.Keyboard(name, priority)
Create an instance of a keyboard input component.
- Parameters:
- name
- {String} The unique name of the component.
- priority
- {Number} The priority of the component among other input components.
Method Detail
{String}
getClassName()
Get the class name of this object
- Returns:
- {String} "R.components.input.Keyboard"
setHostObject(hostObj)
Deprecated in favor of #setGameObject
- Parameters:
- hostObj