Ejemplo n.º 1
0
 public bool IsPressed(PlayerIndex?player, Keys key, Buttons button)
 {
     if (player.HasValue)
     {
         return(Keyboard.IsPressed(key) || GamePads[(int)player].IsPressed(button));
     }
     else
     {
         return(Keyboard.IsPressed(key) ||
                GamePads[0].IsPressed(button) ||
                GamePads[1].IsPressed(button) ||
                GamePads[2].IsPressed(button) ||
                GamePads[3].IsPressed(button));
     }
 }