/// <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); } }
public Vector2 GetThumbStickAmount(TriggersIdx index) { return(ThumbStick[(int)index]); }
public float GetPadTriggerValue(TriggersIdx index) { return(Triggers[(int)index]); }
public bool IsTriggerStroked(TriggersIdx index) { return(Triggers[(int)index] > controllerSensitivity && prevTriggers[(int)index] <= controllerSensitivity); }
public bool IsThumbStickRightStroked(TriggersIdx index) { return(ThumbStick[(int)index].X > controllerSensitivity && prevThumbStick[(int)index].X <= controllerSensitivity); }
public bool IsThumbStickDownStroked(TriggersIdx index) { return(ThumbStick[(int)index].Y < -controllerSensitivity && prevThumbStick[(int)index].Y >= -controllerSensitivity); }
public bool IsPadTriggersStroked(TriggersIdx index) { return(Triggers[(int)index] > 0.0f && prevTriggers[(int)index] <= 0.0f); }