com.jme.input.joystick
Class TriggersJoystickInputListener
java.lang.Object
com.jme.input.joystick.TriggersJoystickInputListener
- All Implemented Interfaces:
- JoystickInputListener
class TriggersJoystickInputListener
- extends java.lang.Object
- implements JoystickInputListener
Each JoystickInputHandlerDevice has an instance of this class which is subscribed at the
JoystickInput to receive joystick events and forward them to the joystick triggers.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TriggersJoystickInputListener
public TriggersJoystickInputListener()
activate
public void activate()
deactivate
public void deactivate()
onAxis
public void onAxis(Joystick controller,
int axis,
float axisValue)
- Description copied from interface:
JoystickInputListener
- Invoked when an axis has changed it's value.
- Specified by:
onAxis in interface JoystickInputListener
- Parameters:
controller - joystick the axis belongs toaxis - index of the axisaxisValue - new value of the axis
onButton
public void onButton(Joystick controller,
int button,
boolean pressed)
- Description copied from interface:
JoystickInputListener
- Invoked when a button was pressed or released.
- Specified by:
onButton in interface JoystickInputListener
- Parameters:
controller - joystick the button belongs tobutton - index of the buttonpressed - true if button was pressed, false if released
add
void add(JoystickInputHandlerDevice.JoystickButtonTrigger trigger)
remove
void remove(JoystickInputHandlerDevice.JoystickButtonTrigger trigger)
add
void add(JoystickInputHandlerDevice.JoystickAxisTrigger trigger)
remove
void remove(JoystickInputHandlerDevice.JoystickAxisTrigger trigger)