Beispiel #1
0
 override protected void KeyPressing()
 {
     if (KeyboardUtility.WasClicked(Keys.Escape) == true || XboxControllerUtility.WasClicked(PlayerIndex.One, Buttons.B))
     {
         MenuSelected(this, EventArgs.Empty);
     }
 }
Beispiel #2
0
 override protected void KeyPressing()
 {
     if (KeyboardUtility.WasClicked(Keys.Enter) || XboxControllerUtility.WasClicked(PlayerIndex.One, Buttons.A))
     {
         StartSelected(this, EventArgs.Empty);
     }
     else if (KeyboardUtility.WasClicked(Keys.Space) || XboxControllerUtility.WasClicked(PlayerIndex.One, Buttons.Y))
     {
         HighscoreSelected(this, EventArgs.Empty);
     }
     else if (KeyboardUtility.WasClicked(Keys.O)) //EJ stöd av XboxControll.
     {
         OptionsSelected(this, EventArgs.Empty);
     }
     else if (KeyboardUtility.WasClicked(Keys.Escape) || XboxControllerUtility.WasClicked(PlayerIndex.One, Buttons.B))
     {
         ExitSelected(this, EventArgs.Empty);
     }
 }