Package com.jme3.input.android
Class AndroidJoyInput14
java.lang.Object
com.jme3.input.android.AndroidJoyInput
com.jme3.input.android.AndroidJoyInput14
AndroidJoyInput14
extends AndroidJoyInput
to include support for physical joysticks/gamepads.-
Field Summary
Fields inherited from class com.jme3.input.android.AndroidJoyInput
disableSensors, inputHandler, joystickList
Fields inherited from interface com.jme3.input.JoyInput
AXIS_POV_X, AXIS_POV_Y
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Ceases listening to events from the device.Joystick[]
loadJoysticks
(InputManager inputManager) Loads a list of joysticks from the system.boolean
onGenericMotion
(android.view.MotionEvent event) boolean
onKey
(android.view.KeyEvent event) void
Pauses the joystick device listeners to save battery life if they are not needed.void
Resumes the joystick device listeners.Methods inherited from class com.jme3.input.android.AndroidJoyInput
addEvent, getInputTimeNanos, initialize, isInitialized, loadSettings, setInputListener, setJoyRumble, setView, update
-
Constructor Details
-
AndroidJoyInput14
-
-
Method Details
-
pauseJoysticks
public void pauseJoysticks()Pauses the joystick device listeners to save battery life if they are not needed. Used to pause when the activity pauses- Overrides:
pauseJoysticks
in classAndroidJoyInput
-
resumeJoysticks
public void resumeJoysticks()Resumes the joystick device listeners. Used to resume when the activity comes to the top of the stack- Overrides:
resumeJoysticks
in classAndroidJoyInput
-
destroy
public void destroy()Description copied from interface:Input
Ceases listening to events from the device.- Specified by:
destroy
in interfaceInput
- Overrides:
destroy
in classAndroidJoyInput
-
loadJoysticks
Description copied from interface:JoyInput
Loads a list of joysticks from the system.- Specified by:
loadJoysticks
in interfaceJoyInput
- Overrides:
loadJoysticks
in classAndroidJoyInput
- Parameters:
inputManager
- The input manager requesting to load joysticks- Returns:
- A list of joysticks that are installed.
-
onGenericMotion
public boolean onGenericMotion(android.view.MotionEvent event) -
onKey
public boolean onKey(android.view.KeyEvent event)
-