Esempio n. 1
0
 private void ButtonPressed(object sender, EventArgsInput e)
 {
     e.SuppressButton();
     if (e.Button == SButton.Space)
     {
         game.Start();
     }
     else if (e.Button == SButton.Escape)
     {
         if (game.HasStarted())
         {
             game.Reset();
         }
         else
         {
             Game1.quit = true;
             Game1.exitActiveMenu();
         }
     }
     else if (e.Button == SButton.P)
     {
         game.TogglePaused();
     }
 }