Exemplo n.º 1
0
 /// <summary>
 /// Conditions needed to go another state
 /// </summary>
 private void ChangeStateConditions()
 {
     if (goBackButton.ButtonPressed())
     {
         _mario.StopAllSoundInstances();
         _game.ChangeState(new HomeMenu(_game, _graphicsDevice, _content));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Conditions needed to go another state
 /// </summary>
 private void ChangeStateConditions()
 {
     if (playButton.ButtonPressed())
     {
         MediaPlayer.Play(gameBackgroundMusic);
         MediaPlayer.Volume = 0.5f;
         _mario.StopAllSoundInstances();
         _game.ChangeState(new DonkeyKong(_game, _graphicsDevice, _content));
     }
     else if (infoButton.ButtonPressed())
     {
         _mario.StopAllSoundInstances();
         MediaPlayer.Stop();
         _game.ChangeState(new InfoPage(_game, _graphicsDevice, _content));
     }
     else if (exitButton.ButtonPressed())
     {
         _game.Exit();
     }
 }