com.jme.input
Class ActionTrigger.CommandTrigger
java.lang.Object
com.jme.input.ActionTrigger
com.jme.input.ActionTrigger.CommandTrigger
- Enclosing class:
- ActionTrigger
static class ActionTrigger.CommandTrigger
- extends ActionTrigger
Trigger implementation for using KeyBindingManager
as trigger.
Method Summary |
void |
checkActivation(char character,
int index,
float position,
float delta,
boolean pressed,
java.lang.Object data)
Invoked to activate or deactivate a trigger on specific event. |
protected java.lang.String |
getDeviceName()
|
void |
performAction(InputActionEvent event)
Perform the action and deactivate the trigger if it does not allow repeats. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ActionTrigger.CommandTrigger
protected ActionTrigger.CommandTrigger(InputHandler handler,
java.lang.String triggerName,
InputActionInterface action,
boolean allowRepeats)
performAction
public void performAction(InputActionEvent event)
- Description copied from class:
ActionTrigger
- Perform the action and deactivate the trigger if it does not allow repeats.
- Overrides:
performAction
in class ActionTrigger
- Parameters:
event
- info about the event that caused the action
checkActivation
public void checkActivation(char character,
int index,
float position,
float delta,
boolean pressed,
java.lang.Object data)
- Description copied from class:
ActionTrigger
- Invoked to activate or deactivate a trigger on specific event. The data in the
parameters depend on the kind of trigger. Defaults for each parameter (set if value for parameter
is unknown or not applicable) are given below. The trigger should activate or deactivate itself
if appropriate.
- Specified by:
checkActivation
in class ActionTrigger
- Parameters:
character
- some character data associated with the event, default '\0'.
example: keyboard characterindex
- index of the device part that caused the event, default -1, >= 0 if valid
example: mouse button index, joystick axis indexposition
- new position of the device part that caused the event, default NaN, common range [-1;1]
example: joystick axis positiondelta
- position delta of the device part that caused the event, default NaN, common range [-1;1]
example: joystick axis deltapressed
- indicates if a button was pressed or released, default: false
example: true if joystick button is pressed, false if joystick button is releaseddata
- any trigger specific data
example: joystick triggers get the Joystick instance for fast comparison- See Also:
ActionTrigger.activate()
,
ActionTrigger.deactivate()
getDeviceName
protected java.lang.String getDeviceName()
- Specified by:
getDeviceName
in class ActionTrigger
- Returns:
- name of the device this trigger belongs to