Ejemplo n.º 1
0
        public Selector update(GameTime gameTime)
        {
            switch (state)
            {
            case State.START:
                state = start.update(gameTime, Keyboard.GetState());
                break;

            case State.LOAD:
                play = new Play();
                play.initialize(currentStage);
                state = load.update(gameTime, Keyboard.GetState());
                break;

            case State.PLAY:
                state = play.update(gameTime, Keyboard.GetState(), out currentStage);
                break;

            case State.MENU:
                state        = menu.update(gameTime, Keyboard.GetState(), currentStage, out outStage);
                currentStage = outStage;
                break;

            case State.CLEAR:
                state = clear.update(gameTime, Keyboard.GetState());
                break;

            case State.FAIL:
                state = fail.update(gameTime, Keyboard.GetState());
                break;

            case State.EXIT:
                return(Selector.MAIN_SELECTOR);
            }
            return(Selector.FROGGER);
        }