private bool IsGamePadButtonPressed(Buttons button1, Buttons button2) { return(CurrentGamePadState.IsButtonDown(button1) || CurrentGamePadState.IsButtonDown(button2)); }
public bool GamepadButtonPressed(Buttons button) { return(CurrentGamePadState.IsButtonDown(button) && PreviousGamePadState.IsButtonUp(button)); }
private bool IsGamePadButtonTapped(Buttons button) { return(PreviousGamePadState.IsButtonDown(button) && CurrentGamePadState.IsButtonUp(button)); }
/// <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)); }