Ejemplo n.º 1
0
        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));
            }
        }
Ejemplo n.º 2
0
        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));
            }
        }
Ejemplo n.º 3
0
        // 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());
        }
Ejemplo n.º 4
0
 // 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());
 }
Ejemplo n.º 5
0
 private void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new Hole1());
 }
Ejemplo n.º 6
0
 private void ExitToMainEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, 0, new MainMenuScreen());
 }