Esempio n. 1
0
 void InputUpdate()
 {
     if (KeyboardManager.ButtonPressUp(Microsoft.Xna.Framework.Input.Keys.Space) || KeyboardManager.ButtonPressUp(Microsoft.Xna.Framework.Input.Keys.Enter))
     {
         if (phase == 1)
         {
             Scheduler.Execute(Scripts.cancelSplashScreen);
         }
         else if (phase == 2)
         {
             EventManager.PlaySoundEffect("boxring");
             ShowTeamSelect();
         }
         // Receiving input, so let's go to the next phase!
     }
 }
Esempio n. 2
0
 public override void Update(GameTime gameTime)
 {
     time += (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (time > timeBeforeEscapable)
     {
         // Check for input to go back to the main menu
         if (KeyboardManager.ButtonPressUp(Microsoft.Xna.Framework.Input.Keys.Space) || KeyboardManager.ButtonPressUp(Microsoft.Xna.Framework.Input.Keys.Enter))
         {
             TreasureTown.SetScene(new MenuScene());
         }
     }
     if (time > timeBeforeMainMenu)
     {
         TreasureTown.SetScene(new MenuScene());
     }
 }