Пример #1
0
        private void StopVideo()
        {
            videoPlayer.Stop();
            videoPlaying = false;

            audio.StopBackgroundMusic();

            // Start the game when the video is over
            currentGameState = GameState.Play;
            currentLevel = 0;
            CurrentLevelState = LevelState.Instructions;
        }
Пример #2
0
        public override void Update(GameTime gameTime)
        {
            // Update the game state when the end of level is reached
            if (LevelOver())
            {
                ((Game1)Game).CurrentLevelState = Game1.LevelState.End;
                UnloadResources();

                // Stop any background music that might have been playing
                Audio audio = (Audio)Game.Services.GetService(typeof(Audio));
                audio.StopBackgroundMusic();
            }

            base.Update(gameTime);
        }