GamePadState Constructor (Vector2, Vector2, Single, Single, Buttons )
Initializes a new instance of the GamePadState class with the specified stick, trigger, and button values.
Syntax
'Declaration
Public Sub New ( _
leftThumbStick As Vector2, _
rightThumbStick As Vector2, _
leftTrigger As Single, _
rightTrigger As Single, _
buttons As Buttons() _
)
public GamePadState (
Vector2 leftThumbStick,
Vector2 rightThumbStick,
float leftTrigger,
float rightTrigger,
params Buttons[] buttons
)
public:
GamePadState(
Vector2 leftThumbStick,
Vector2 rightThumbStick,
float leftTrigger,
float rightTrigger,
params Buttons buttons[]
)
Parameters
- leftThumbStick
Type: Vector2
Left stick value. Each axis is clamped between −1.0 and 1.0. - rightThumbStick
Type: Vector2
Right stick value. Each axis is clamped between −1.0 and 1.0. - leftTrigger
Type: Single
Left trigger value. This value is clamped between 0.0 and 1.0. - rightTrigger
Type: Single
Right trigger value. This value is clamped between 0.0 and 1.0. - buttons
Type: Buttons
Array or parameter list of Buttons to initialize as pressed.
Remarks
Games normally use GetState to get the true gamepad state. This constructor is used instead to simulate gamepad input for passing within the game's own input subsystem.
Requirements
Namespace: Microsoft.Xna.Framework.Input
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
See Also
Reference
GamePadState Structure
GamePadState Members
Microsoft.Xna.Framework.Input Namespace
Platforms
Windows Phone