Class Index | File Index

Classes


Class R.components.input.Mouse


Extends R.components.Input.
A component which responds to mouse events and notifies the host object when one of the events occurs. The R.engine.GameObject should add event handlers for any of the following:

Each event is passed the event object and a {@link R.struct.MouseInfo MouseInfo} structure which contains information about the mouse event in the context of a game.

Note: The rendering context that the object is contained within needs to enable mouse event capturing with the R.rendercontexts.AbstractRenderContext#captureMouse method. Objects which wish to be notified via the mouseover event handler will need to define a bounding box.
Defined in: mouse.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
R.components.input.Mouse(name, priority)
Create a mouse 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
 
Destroy the component.
 
execute(renderContext, time, dt)
Perform the checks on the mouse info object, and also perform intersection tests to be able to call mouse events.
 
Get the class name of this object
 
setHostObject(hostobj)
Deprecated in favor of #setGameObject
Methods borrowed from class R.components.Base:
getGameObject, getHostObject, getPriority, getType, getTypeString, release, setGameObject, setPriority
Methods borrowed from class R.engine.BaseObject:
addEvent, addEvents, 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.Mouse(name, priority)
Create a mouse input component.
Parameters:
name
{String} The unique name of the component.
priority
{Number} The priority of the component among other input components.
Method Detail
destroy()
Destroy the component.

execute(renderContext, time, dt)
Perform the checks on the mouse info object, and also perform intersection tests to be able to call mouse events.
Parameters:
renderContext
{R.rendercontexts.AbstractRenderContext} The render context
time
{Number} The current world time
dt
{Number} The delta between the world time and the last time the world was updated in milliseconds.

{String} getClassName()
Get the class name of this object
Returns:
{String} "R.components.input.Mouse"

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)