Esempio n. 1
0
        public override void Update(GameTime gameTime, bool otherScreenHasFocus,
                                    bool coveredByOtherScreen)
        {
            if (TransitionPosition == 0)
            {
                ExitScreen();
            }
            if (ScreenState == ScreenState.TransitionOff && TransitionPosition > .9f)
            {
                ScreenManager.RemoveScreen(this);
                ScreenManager.AddScreen(new MainMenuScreen());
            }

            base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);
        }
Esempio n. 2
0
        protected override void OnSelectEntry(int entryIndex)
        {
            switch (entryIndex)
            {
            case 0:
                ExitScreen();
                break;

            case 1:
                //also remove the screen that called this pausescreen
                ScreenManager.RemoveScreen(_caller);
                ExitScreen();
                ScreenManager.AddScreen(new MainMenuScreen());
                break;
            }
        }