public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen) { base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen); if (coveredByOtherScreen) { _pauseAlpha = Math.Min(_pauseAlpha + 1f / 32, 1); windParticleSystem.RemoveAllParticles(); } else { _pauseAlpha = Math.Max(_pauseAlpha - 1f / 32, 0); } if (switch_holes) { //Remove Particles windParticleSystem.RemoveAllParticles(); windParticleSystem.Enabled = false; LoadingScreen.Load(ScreenManager, true, ControllingPlayer, new EndScreen(high_score_time + past_high_score)); } }
public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen) { base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen); if (coveredByOtherScreen) { _pauseAlpha = Math.Min(_pauseAlpha + 1f / 32, 1); windParticleSystem.RemoveAllParticles(); } else { _pauseAlpha = Math.Max(_pauseAlpha - 1f / 32, 0); } if (switch_holes) { //Remove Particles - kept remove all particles to make sure they dequed, enabled = false to stop spawning windParticleSystem.RemoveAllParticles(); windParticleSystem.Enabled = false; LoadingScreen.Load(ScreenManager, true, ControllingPlayer, new Hole2(high_score_time)); } }
// This uses the loading screen to transition from the game back to the main menu screen. private void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e) { var screens = ScreenManager.GetScreens(); LoadingScreen.Load(ScreenManager, true, null, new BackgroundScreen(), new MainMenuScreen()); }
// This uses the loading screen to transition from the game back to the main menu screen. private void ConfirmRestartMessageBoxAccepted(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, true, 0, new Hole1()); }
private void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new Hole1()); }
private void ExitToMainEntrySelected(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, true, 0, new MainMenuScreen()); }