Class Index | File Index

Classes


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:

Each event handler will be passed six arguments. The first argument is the event object. The second argument is the character code, a number which represents the key that was pressed. The third argument is the keyCode, a number which represents special keys that were pressed, such as the arrow keys and function keys. See R.engine.Events for key codes of the non-alphabetic keys. The fourth, fifth, and sixth arguments are boolean flags indicating if the Control, Alt, or Shift keys, respectively, were pressed.
Defined in: keyboard.js.

Class Summary
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 Summary
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

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 18 2013 16:09:15 GMT-0400 (EDT)