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; }
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); }