public abstract class PS4GamePad extends java.lang.Object implements GamePadMapping<PS4GamePadListener>, org.mini2Dx.gdx.utils.Disposable
| Modifier and Type | Field and Description |
|---|---|
protected GamePad |
gamePad |
static java.lang.String[] |
ID |
protected boolean |
l2 |
protected DeadZone |
l2DeadZone |
protected DeadZone |
leftStickDeadZone |
protected org.mini2Dx.gdx.utils.Array<PS4GamePadListener> |
listeners |
protected boolean |
r2 |
protected DeadZone |
r2DeadZone |
protected DeadZone |
rightStickDeadZone |
| Constructor and Description |
|---|
PS4GamePad(GamePad gamePad) |
PS4GamePad(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<PS4GamePadListener> listeners
protected final GamePad gamePad
protected DeadZone leftStickDeadZone
protected DeadZone rightStickDeadZone
protected DeadZone l2DeadZone
protected DeadZone r2DeadZone
protected boolean l2
protected boolean r2
public PS4GamePad(GamePad gamePad)
public abstract boolean isButtonDown(PS4Button button)
public abstract boolean isButtonUp(PS4Button button)
protected boolean notifyConnected()
protected boolean notifyDisconnected()
protected boolean notifyButtonDown(PS4Button button)
protected boolean notifyButtonUp(PS4Button button)
protected boolean notifyLeftStickXMoved(float value)
protected boolean notifyLeftStickYMoved(float value)
protected boolean notifyRightStickXMoved(float value)
protected boolean notifyRightStickYMoved(float value)
protected boolean notifyL2Moved(float value)
protected boolean notifyR2Moved(float value)
public void addListener(PS4GamePadListener listener)
addListener in interface GamePadMapping<PS4GamePadListener>public void addListener(int index,
PS4GamePadListener listener)
addListener in interface GamePadMapping<PS4GamePadListener>public void removeListener(PS4GamePadListener listener)
removeListener in interface GamePadMapping<PS4GamePadListener>public void removeListener(int index)
removeListener in interface GamePadMapping<PS4GamePadListener>public void clearListeners()
clearListeners in interface GamePadMapping<PS4GamePadListener>public int getTotalListeners()
getTotalListeners in interface GamePadMapping<PS4GamePadListener>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 getL2DeadZone()
public void setL2DeadZone(DeadZone l2DeadZone)
public DeadZone getR2DeadZone()
public void setR2DeadZone(DeadZone r2DeadZone)
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()