Exemplo n.º 1
0
        public MenuResult Update(GameTime gameTime)
        {
            cooldown -= gameTime.ElapsedGameTime.Milliseconds;
            if (cooldown < 0)
            {
                cooldown = 0;
            }
            animateTime += gameTime.ElapsedGameTime.Milliseconds;

            if (state == TutorialLauncherState.ZOOM && animateTime > maxAnimateTime)
            {
                state       = TutorialLauncherState.NURSEIN;
                animateTime = 0;
            }
            if (state == TutorialLauncherState.NURSEIN && animateTime > maxAnimateTime)
            {
                state = TutorialLauncherState.NURSETEXT;
            }
            if (state == TutorialLauncherState.NURSETEXT)
            {
                if (Keyboard.GetState().IsKeyDown(Keys.Space) || GamePad.GetState(Game.playerIndex).IsButtonDown(Buttons.A))
                {
                    state       = TutorialLauncherState.DOCTORIN;
                    animateTime = 0;
                }
            }
            if (state == TutorialLauncherState.DOCTORIN && animateTime > maxAnimateTime)
            {
                state = TutorialLauncherState.DOCTORTEXT;
            }
            if (state == TutorialLauncherState.DOCTORTEXT)
            {
                if (Keyboard.GetState().IsKeyDown(Keys.Space) || GamePad.GetState(Game.playerIndex).IsButtonDown(Buttons.A))
                {
                    SoundEffects.PlayClick();
                    state       = TutorialLauncherState.DOCTOROUT;
                    animateTime = 0;
                }
            }
            if (state == TutorialLauncherState.DOCTOROUT && animateTime > maxAnimateTime)
            {
                state = TutorialLauncherState.FINALTEXT;
            }
            if (state == TutorialLauncherState.FINALTEXT)
            {
                if (Keyboard.GetState().IsKeyDown(Keys.Space) || GamePad.GetState(Game.playerIndex).IsButtonDown(Buttons.A))
                {
                    return(MenuResult.StartTutorial);
                }
            }
            return(MenuResult.None);
        }
Exemplo n.º 2
0
        public MenuResult Update(GameTime gameTime)
        {
            cooldown -= gameTime.ElapsedGameTime.Milliseconds;
            if (cooldown < 0) cooldown = 0;
            animateTime += gameTime.ElapsedGameTime.Milliseconds;

            if (state == TutorialLauncherState.ZOOM && animateTime > maxAnimateTime)
            {
                state = TutorialLauncherState.NURSEIN;
                animateTime = 0;
            }
            if (state == TutorialLauncherState.NURSEIN && animateTime > maxAnimateTime)
            {
                state = TutorialLauncherState.NURSETEXT;
            }
            if (state == TutorialLauncherState.NURSETEXT)
            {
                if (Keyboard.GetState().IsKeyDown(Keys.Space) || GamePad.GetState(Game.playerIndex).IsButtonDown(Buttons.A))
                {
                    state = TutorialLauncherState.DOCTORIN;
                    animateTime = 0;
                }
            }
            if (state == TutorialLauncherState.DOCTORIN && animateTime > maxAnimateTime)
            {
                state = TutorialLauncherState.DOCTORTEXT;
            }
            if (state == TutorialLauncherState.DOCTORTEXT)
            {
                if (Keyboard.GetState().IsKeyDown(Keys.Space) || GamePad.GetState(Game.playerIndex).IsButtonDown(Buttons.A))
                {
                    SoundEffects.PlayClick();
                    state = TutorialLauncherState.DOCTOROUT;
                    animateTime = 0;
                }
            }
            if (state == TutorialLauncherState.DOCTOROUT && animateTime > maxAnimateTime)
            {
                state = TutorialLauncherState.FINALTEXT;
            }
            if (state == TutorialLauncherState.FINALTEXT)
            {
                if (Keyboard.GetState().IsKeyDown(Keys.Space) || GamePad.GetState(Game.playerIndex).IsButtonDown(Buttons.A))
                {
                    return MenuResult.StartTutorial;
                }
            }
            return MenuResult.None;
        }