Example #1
0
 internal Frame Update()
 {
     if (supportedPlatform)                                     // We only handle the Speech Manager if it is functional.
     {
         if (game.SpeechManager.WordWasSaid(Keywords.ExitWord)) // Exits the game on exit-word
         {
             game.ExitGame();
         }
         if (game.SpeechManager.WordWasSaid(Keywords.StartWord)) // Starts the game on start-word
         {
             game.paused = false;
         }
         if (game.SpeechManager.WordWasSaid(Keywords.RestartWord)) // Restarts game on restart-word
         {
             game.resetGame();
             game.MovementManager.ResetKinect();
         }
     }
     if (Keyboard.GetState().IsKeyDown(Keys.Escape)) // Exit button for when speech is not enabled.
     {
         game.ExitGame();
     }
     return(new MenuFrame());
 }