/// <summary>
 /// Finds out if a thumbstick on a connected gamepad is being pushed right.
 /// </summary>
 /// <param name="index">The thumbstick index.</param>
 /// <returns>The result of the check.</returns>
 public static bool IsThumbStickRight(TriggersIdx index)
 {
     if (gamePad != null)
     {
         return(gamePad.IsThumbStickRightStroked(index));
     }
     else
     {
         return(false);
     }
 }
 /// <summary>
 /// Finds out if a gamepad trigger hase been pressed.
 /// </summary>
 /// <param name="index">The trigger to check.</param>
 /// <returns>The result of the check.</returns>
 public static bool IsTriggerStroked(TriggersIdx index)
 {
     if (gamePad != null)
     {
         return(gamePad.IsPadTriggersStroked(index));
     }
     else
     {
         return(false);
     }
 }
 /// <summary>
 /// Finds out if a thumbstick on a connected gamepad is being held right.
 /// </summary>
 /// <param name="index">The thumbstick index.</param>
 /// <returns>The result of the check.</returns>
 public static bool IsThumbStickHeldRight(TriggersIdx index)
 {
     if (gamePad != null)
     {
         return(gamePad.GetThumbStickAmount(index).X >= gamePad.Sensitivity);
     }
     else
     {
         return(false);
     }
 }
 /// <summary>
 /// Finds the amount of movement in a thumbstick as a Vector2.
 /// </summary>
 /// <param name="index">The thumbstick to check.</param>
 /// <returns>The result of the check.</returns>
 public static Vector2 GetThumbStickAmount(TriggersIdx index)
 {
     if (gamePad != null)
     {
         return(gamePad.GetThumbStickAmount(index));
     }
     else
     {
         return
             (Vector2.Zero);
     }
 }
Beispiel #5
0
 public Vector2 GetThumbStickAmount(TriggersIdx index)
 {
     return(ThumbStick[(int)index]);
 }
Beispiel #6
0
 public float GetPadTriggerValue(TriggersIdx index)
 {
     return(Triggers[(int)index]);
 }
Beispiel #7
0
 public bool IsTriggerStroked(TriggersIdx index)
 {
     return(Triggers[(int)index] > controllerSensitivity &&
            prevTriggers[(int)index] <= controllerSensitivity);
 }
Beispiel #8
0
 public bool IsThumbStickRightStroked(TriggersIdx index)
 {
     return(ThumbStick[(int)index].X > controllerSensitivity &&
            prevThumbStick[(int)index].X <= controllerSensitivity);
 }
Beispiel #9
0
 public bool IsThumbStickDownStroked(TriggersIdx index)
 {
     return(ThumbStick[(int)index].Y < -controllerSensitivity &&
            prevThumbStick[(int)index].Y >= -controllerSensitivity);
 }
Beispiel #10
0
 public bool IsPadTriggersStroked(TriggersIdx index)
 {
     return(Triggers[(int)index] > 0.0f && prevTriggers[(int)index] <= 0.0f);
 }