public abstract class XboxGamePad extends java.lang.Object implements GamePadMapping<XboxGamePadListener>, org.mini2Dx.gdx.utils.Disposable
| Modifier and Type | Field and Description |
|---|---|
protected GamePad |
gamePad |
static java.lang.String[] |
ID |
protected DeadZone |
leftStickDeadZone |
protected boolean |
leftTrigger |
protected DeadZone |
leftTriggerDeadZone |
protected org.mini2Dx.gdx.utils.Array<XboxGamePadListener> |
listeners |
protected DeadZone |
rightStickDeadZone |
protected boolean |
rightTrigger |
protected DeadZone |
rightTriggerDeadZone |
| Constructor and Description |
|---|
XboxGamePad(GamePad gamePad) |
XboxGamePad(GamePad gamePad,
DeadZone leftStickDeadZone,
DeadZone rightStickDeadZone) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonAccelerometerChanged, onAxisChanged, onButtonDown, onButtonUp, onConnect, onDisconnectpublic static final java.lang.String[] ID
protected final org.mini2Dx.gdx.utils.Array<XboxGamePadListener> listeners
protected final GamePad gamePad
protected DeadZone leftStickDeadZone
protected DeadZone rightStickDeadZone
protected DeadZone leftTriggerDeadZone
protected DeadZone rightTriggerDeadZone
protected boolean leftTrigger
protected boolean rightTrigger
public XboxGamePad(GamePad gamePad)
public abstract boolean isButtonDown(XboxButton button)
public abstract boolean isButtonUp(XboxButton button)
protected boolean notifyConnected()
protected boolean notifyDisconnected()
protected boolean notifyButtonDown(XboxButton button)
protected boolean notifyButtonUp(XboxButton button)
protected boolean notifyLeftTriggerMoved(float value)
protected boolean notifyRightTriggerMoved(float value)
protected boolean notifyLeftStickXMoved(float value)
protected boolean notifyLeftStickYMoved(float value)
protected boolean notifyRightStickXMoved(float value)
protected boolean notifyRightStickYMoved(float value)
public void addListener(XboxGamePadListener listener)
addListener in interface GamePadMapping<XboxGamePadListener>public void addListener(int index,
XboxGamePadListener listener)
addListener in interface GamePadMapping<XboxGamePadListener>public void removeListener(int index)
removeListener in interface GamePadMapping<XboxGamePadListener>public void removeListener(XboxGamePadListener listener)
removeListener in interface GamePadMapping<XboxGamePadListener>public void clearListeners()
clearListeners in interface GamePadMapping<XboxGamePadListener>public int getTotalListeners()
getTotalListeners in interface GamePadMapping<XboxGamePadListener>public void dispose()
dispose in interface org.mini2Dx.gdx.utils.Disposablepublic DeadZone getLeftStickDeadZone()
public void setLeftStickDeadZone(DeadZone leftStickDeadZone)
public DeadZone getRightStickDeadZone()
public void setRightStickDeadZone(DeadZone rightStickDeadZone)
public DeadZone getLeftTriggerDeadZone()
public void setLeftTriggerDeadZone(DeadZone leftTriggerDeadZone)
public DeadZone getRightTriggerDeadZone()
public void setRightTriggerDeadZone(DeadZone rightTriggerDeadZone)
public boolean isConnected()
public java.lang.String getInstanceId()
public java.lang.String getModelInfo()
public boolean isPlayerIndicesSupported()
public int getPlayerIndex()
public void setPlayerIndex(int playerIndex)
public boolean isVibrateSupported()
public boolean isVibrating()
public float getVibrationStrength()
public void startVibration(float strength)
public void stopVibration()