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

            case State.SELECTION:
                state = selection.update(gameTime, Keyboard.GetState());
                if (state == State.PLAY1)
                {
                    play1 = new Play1();
                    play1.initialize();
                }
                else if (state == State.PLAY2)
                {
                    play2 = new Play2();
                    play2.initialize();
                }
                break;

            case State.PLAY1:
                state = play1.update(gameTime, Keyboard.GetState());
                break;

            case State.PLAY2:
                state = play2.update(gameTime, Keyboard.GetState());
                break;

            case State.MENU1:
                state = menu1.update(gameTime, Keyboard.GetState());
                break;

            case State.MENU2:
                state = menu2.update(gameTime, Keyboard.GetState());
                break;

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