com.jme.input.action
Class InputAction

java.lang.Object
  extended by com.jme.input.action.InputAction
All Implemented Interfaces:
InputActionInterface
Direct Known Subclasses:
JMEAction, KeyInputAction, MouseInputAction

public abstract class InputAction
extends java.lang.Object
implements InputActionInterface

An InputAction can be subscribed at an InputHandler to get its InputActionInterface.performAction(InputActionEvent) method called on specific event triggers. It also defines an interface that sets the criteria for input actions, e.g. the speed of the action.

Version:
$Id: InputAction.java 4131 2009-03-19 20:15:28Z blaine.dev $
Author:
Mark Powell

Field Summary
protected  float speed
          A speed value that, if desired, can change how actions are performed.
 
Constructor Summary
InputAction()
           
 
Method Summary
 float getSpeed()
          Returns the currently set speed.
 void setSpeed(float speed)
          setSpeed defines the speed at which this action occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jme.input.action.InputActionInterface
performAction
 

Field Detail

speed

protected float speed
A speed value that, if desired, can change how actions are performed.

Constructor Detail

InputAction

public InputAction()
Method Detail

setSpeed

public void setSpeed(float speed)
setSpeed defines the speed at which this action occurs.

Parameters:
speed - the speed at which this action occurs.

getSpeed

public float getSpeed()
Returns the currently set speed. Speed is 0 by default.

Returns:
The current speed.