示例#1
0
 private bool IsGamePadButtonTapped(Buttons button)
 {
     return(PreviousGamePadState.IsButtonDown(button) && CurrentGamePadState.IsButtonUp(button));
 }
示例#2
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));
 }