Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the GamePadState class with the specified stick,
 /// trigger, and button values.
 /// </summary>
 /// <param name="leftThumbStick">
 /// Left stick value. Each axis is clamped between 1.0 and 1.0.
 /// </param>
 /// <param name="rightThumbStick">
 /// Right stick value. Each axis is clamped between 1.0 and 1.0.
 /// </param>
 /// <param name="leftTrigger">
 /// Left trigger value. This value is clamped between 0.0 and 1.0.
 /// </param>
 /// <param name="rightTrigger">
 /// Right trigger value. This value is clamped between 0.0 and 1.0.
 /// </param>
 /// <param name="buttons">
 /// Array or parameter list of Buttons to initialize as pressed.
 /// </param>
 public GamePadState(
     Vector2 leftThumbStick,
     Vector2 rightThumbStick,
     float leftTrigger,
     float rightTrigger,
     params Buttons[] buttons
     ) : this(
         new GamePadThumbSticks(leftThumbStick, rightThumbStick),
         new GamePadTriggers(leftTrigger, rightTrigger),
         GamePadButtons.FromButtonArray(buttons),
         GamePadDPad.FromButtonArray(buttons)
         )
 {
 }