Exemplo n.º 1
0
        public void Update(GameTime gameTime)
        {
            ctrl.setStates();

            if (ctrl.Select())
            {
                BustinOutGame.setLevel(1);
                BustinOutGame.setState(4, 0);
            }
        }
Exemplo n.º 2
0
        public void Update(GameTime gameTime)
        {
            ctrl.setStates();

            if (ctrl.Up())
            {
                PositionUp();
            }

            if (ctrl.Down())
            {
                PositionDown();
            }

            if (ctrl.Select())
            {
                //Easy
                if (location == 0)
                {
                    BustinOutGame.setLevel(1);
                    BustinOutGame.setState(12, 1);
                    BustinOutGame.timeRemaining = TimeSpan.FromMinutes(40.0);
                }

                //Normal
                else if (location == 1)
                {
                    BustinOutGame.setLevel(1);
                    BustinOutGame.setState(12, 1);
                    BustinOutGame.timeRemaining = TimeSpan.FromMinutes(20.0);
                }

                //Go back to title screen
                else
                {
                    BustinOutGame.setState(1, 1);
                }
            }

            if (ctrl.Back())
            {
                BustinOutGame.setState(1, 1);
            }
        }
Exemplo n.º 3
0
        public void Update(GameTime gameTime)
        {
            ctrl.setStates();

            //handles if unpaused, where the game returns to
            if (ctrl.Back() && whereFrom == 0)
            {
                BustinOutGame.setState(4, 0);
            }
            else if (ctrl.Back() && whereFrom == 1)
            {
                BustinOutGame.setState(8, 0);
            }
            else if (ctrl.Back() && whereFrom == 2)
            {
                BustinOutGame.setState(9, 0);
            }


            if (ctrl.Down())
            {
                if (option == 4)
                {
                    option = 0;
                }
                else
                {
                    option++;
                }
            }

            if (ctrl.Up())
            {
                if (option == 0)
                {
                    option = 4;
                }
                else
                {
                    option--;
                }
            }

            if (ctrl.Select())
            {
                if (option == 0 && whereFrom == 0)
                {
                    BustinOutGame.setState(4, 0);
                }
                else if (option == 0 && whereFrom == 1)
                {
                    BustinOutGame.setState(8, 0);
                }
                else if (option == 0 && whereFrom == 2)
                {
                    BustinOutGame.setState(9, 0);
                }
                else if (option == 1)
                {
                    BustinOutGame.setState(3, 0);
                    Options.FromTitle = 1;
                }
                else if (option == 2 && whereFrom == 0)
                {
                    BustinOutGame.RestartGame(whereFrom);
                    BustinOutGame.setState(4, 0);
                    BustinOutGame.setLevel(1);
                }
                else if (option == 2 && whereFrom == 1)
                {
                    BustinOutGame.RestartGame(whereFrom);
                    BustinOutGame.setState(8, 0);
                }
                else if (option == 3)
                {
                    BustinOutGame.RestartGame(whereFrom);
                    BustinOutGame.setState(1, 0);
                    BustinOutGame.setLevel(0);
                }
                else
                {
                    Program.gameExit();
                }

                option = 0;
            }

            SetPosition();
        }