private static bool AnyGamepadHasButton(XBox360GamepadButton button)
 {
     return XBox360.GetGamepads().Any(gamepad => gamepad.WButtons == button);
 }
 /// <summary>
 /// Checks if a specific button is pressed
 /// </summary>
 /// <param name="button">Button to check</param>
 /// <returns>True if button is pressed, false otherwise</returns>
 private bool IsPressed(XBox360GamepadButton button)
 {
     return((ushort)(button & WButtons) != 0);
 }
Example #3
0
 private static bool AnyGamepadHasButton(XBox360GamepadButton button)
 {
     return(XBox360.GetGamepads().Any(gamepad => gamepad.WButtons == button));
 }
 /// <summary>
 /// Checks if a specific button is pressed
 /// </summary>
 /// <param name="button">Button to check</param>
 /// <returns>True if button is pressed, false otherwise</returns>
 private bool IsPressed(XBox360GamepadButton button)
 {
     return (ushort)(button & WButtons) != 0;
 }