public class LibgdxAdvancedGamePad extends LibgdxGamePad
| Modifier and Type | Field and Description |
|---|---|
com.badlogic.gdx.controllers.AdvancedController |
advancedController |
protected float |
vibrateStrength |
connected, gamePadType| Constructor and Description |
|---|
LibgdxAdvancedGamePad(com.badlogic.gdx.controllers.AdvancedController controller) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getInstanceId()
Returns the ID for this
GamePad. |
int |
getPlayerIndex()
Returns the player assigned to this gamepad
|
float |
getVibrationStrength()
Returns the strength of the vibration/rumble
|
boolean |
isPlayerIndicesSupported()
Returns if this game pad supports assigning player numbers to it
|
boolean |
isVibrateSupported()
Returns if this gamepad has vibrate/rumble functionality
|
boolean |
isVibrating()
Returns if this gamepad is currently vibrating/rumbling
|
void |
setPlayerIndex(int playerIndex)
Sets the player assigned to this gamepad
|
void |
startVibration(float strength)
Starts vibrating/rumbling the gamepad
|
void |
stopVibration()
Stops the vibrating/rumbling of the gamepad
|
accelerometerMoved, addListener, axisMoved, buttonDown, buttonUp, connected, disconnected, getAccelerometer, getAccelerometerSensitivity, getAxis, getGamePadType, getModelInfo, getPov, init, isAccelerometerSupported, isButtonDown, isButtonUp, isConnected, notifyAccelerometerChanged, notifyAxisChanged, notifyButtonDown, notifyButtonUp, notifyConnected, notifyDisconnected, notifyPovChanged, povMoved, removeListener, setAccelerometerSensitivity, xSliderMoved, ySliderMovedpublic final com.badlogic.gdx.controllers.AdvancedController advancedController
protected float vibrateStrength
public LibgdxAdvancedGamePad(com.badlogic.gdx.controllers.AdvancedController controller)
public java.lang.String getInstanceId()
GamePadGamePad.
When supported by the driver, if multiple gamepads are connected each will have a unique instance id.
Otherwise, this will fallback for to the name of the device returned by the driver.
If a gamepad is unplugged and reconnected, it will have the same ID.getInstanceId in interface GamePadgetInstanceId in class LibgdxGamePadpublic boolean isPlayerIndicesSupported()
GamePadisPlayerIndicesSupported in interface GamePadisPlayerIndicesSupported in class LibgdxGamePadpublic int getPlayerIndex()
GamePadgetPlayerIndex in interface GamePadgetPlayerIndex in class LibgdxGamePadpublic void setPlayerIndex(int playerIndex)
GamePadsetPlayerIndex in interface GamePadsetPlayerIndex in class LibgdxGamePadplayerIndex - -1 if unassignedpublic boolean isVibrateSupported()
GamePadisVibrateSupported in interface GamePadisVibrateSupported in class LibgdxGamePadpublic boolean isVibrating()
GamePadisVibrating in interface GamePadisVibrating in class LibgdxGamePadpublic float getVibrationStrength()
GamePadgetVibrationStrength in interface GamePadgetVibrationStrength in class LibgdxGamePadpublic void startVibration(float strength)
GamePadstartVibration in interface GamePadstartVibration in class LibgdxGamePadstrength - A value between 0f and 1fpublic void stopVibration()
GamePadstopVibration in interface GamePadstopVibration in class LibgdxGamePad