GamePadState Constructor (GamePadThumbSticks, GamePadTriggers, GamePadButtons, GamePadDPad)
Initializes a new instance of the GamePadState class using the specified GamePadThumbSticks, GamePadTriggers, GamePadButtons, and GamePadDPad.
Syntax
'Declaration
Public Sub New ( _
thumbSticks As GamePadThumbSticks, _
triggers As GamePadTriggers, _
buttons As GamePadButtons, _
dPad As GamePadDPad _
)
public GamePadState (
GamePadThumbSticks thumbSticks,
GamePadTriggers triggers,
GamePadButtons buttons,
GamePadDPad dPad
)
public:
GamePadState(
GamePadThumbSticks thumbSticks,
GamePadTriggers triggers,
GamePadButtons buttons,
GamePadDPad dPad
)
Parameters
- thumbSticks
Type: GamePadThumbSticks
Initial thumbstick state. - triggers
Type: GamePadTriggers
Initial trigger state. - buttons
Type: GamePadButtons
Initial button state. - dPad
Type: GamePadDPad
Initial directional pad state.
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.
Thumbstick state is different from the state indicated by the GamePadButtons.LeftStick Property or the GamePadButtons.RightStick Property. Thumbstick state refers to the position of the thumbstick, while the LeftStick or RightStick properties indicate if the stick is "clicked" in.
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