Beispiel #1
0
 private bool IsGamePadButtonPressed(Buttons button1, Buttons button2)
 {
     return(CurrentGamePadState.IsButtonDown(button1) || CurrentGamePadState.IsButtonDown(button2));
 }
Beispiel #2
0
 public bool GamepadButtonPressed(Buttons button)
 {
     return(CurrentGamePadState.IsButtonDown(button) && PreviousGamePadState.IsButtonUp(button));
 }
Beispiel #3
0
 private bool IsGamePadButtonTapped(Buttons button)
 {
     return(PreviousGamePadState.IsButtonDown(button) && CurrentGamePadState.IsButtonUp(button));
 }
Beispiel #4
0
 /// <summary>
 /// Gets whether the given button was just released.
 /// </summary>
 /// <param name="button">The given button.</param>
 /// <returns>True if the button was just released, false otherwise.</returns>
 public static bool GetButtonDownUp(Buttons button)
 {
     return(PreviousGamePadState.IsButtonDown(button) && CurrentGamePadState.IsButtonUp(button));
 }