|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSystem.ValueType
Microsoft.Xna.Framework.Input.GamePadState
public final class GamePadState
Represents specific information about the state of an Xbox 360 Controller, including the current state of buttons and sticks.
Field Summary | |
---|---|
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 Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final GamePadButtons Buttons
public final boolean IsConnected
public final GamePadDPad DPad
public final GamePadThumbSticks ThumbSticks
public final GamePadTriggers Triggers
Constructor Detail |
---|
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.Method Detail |
---|
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
String
- representation of this object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |