public final class GamePadState extends ValueType
Modifier and Type | Field and Description |
---|---|
GamePadButtons |
Buttons
Returns a structure that identifies what buttons on the Xbox 360 controller are pressed.
|
GamePadDPad |
DPad
Returns a structure that identifies what directions of the directional pad on the Xbox 360 Controller are pressed.
|
boolean |
IsConnected
Indicates whether the Xbox 360 Controller is connected.
|
GamePadThumbSticks |
ThumbSticks
Returns a structure that indicates the position of the Xbox 360 Controller sticks (thumbsticks).
|
GamePadTriggers |
Triggers
Returns a structure that identifies the position of triggers on the Xbox 360 controller.
|
Constructor and Description |
---|
GamePadState(GamePadThumbSticks thumbSticks,
GamePadTriggers triggers,
GamePadButtons buttons,
GamePadDPad dPad)
Initializes a new instance of the GamePadState class using the specified GamePadThumbSticks, GamePadTriggers, GamePadButtons, and GamePadDPad.
|
GamePadState(Vector2 leftThumbStick,
Vector2 rightThumbStick,
float leftTrigger,
float rightTrigger,
Buttons... buttons)
Initializes a new instance of the GamePadState class with the specified stick, trigger, and button values.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Returns a value that indicates whether the current instance is equal to a specified object.
|
int |
hashCode()
Gets the hash code for this instance.
|
java.lang.String |
toString()
Retrieves a string representation of this object.
|
public final GamePadButtons Buttons
public final boolean IsConnected
public final GamePadDPad DPad
public final GamePadThumbSticks ThumbSticks
public final GamePadTriggers Triggers
public GamePadState(GamePadThumbSticks thumbSticks, GamePadTriggers triggers, GamePadButtons buttons, GamePadDPad dPad)
thumbSticks
- Initial stick state.triggers
- Initial trigger state.buttons
- Initial button state.dPad
- Initial directional pad state.public GamePadState(Vector2 leftThumbStick, Vector2 rightThumbStick, float leftTrigger, float rightTrigger, Buttons... buttons)
leftThumbStick
- Left stick value. Each axis is clamped between -1.0 and 1.0.rightThumbStick
- Right stick value. Each axis is clamped between -1.0 and 1.0.leftTrigger
- Left trigger value. This value is clamped between 0.0 and 1.0.rightTrigger
- Right trigger value. This value is clamped between 0.0 and 1.0.buttons
- Array or parameter list of Buttons to initialize as pressed.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object with which to make the comparison.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object