Ejemplo n.º 1
0
        public override void Update(GameTime gameTime, KinectInterface gameInput)
        {
            // Update buttons state
            _startButton.Update(gameTime, gameInput);
            _start2Button.Update(gameTime, gameInput);
            _quitButton.Update(gameTime, gameInput);

            // Action
            if (_startButton.IsPressed())
            {
                _nextScene = new Level1(gameInput); // Game will quit
                _sceneFinished = true;
            }
            else if (_start2Button.IsPressed())
            {
                _nextScene = new Level2(gameInput); // Game will quit
                _sceneFinished = true;
            }
            else if (_quitButton.IsPressed())
            {
                _nextScene = null; // Game will quit
                _sceneFinished = true;
            }
        }
Ejemplo n.º 2
0
        public override void Update(GameTime gameTime, KinectInterface gameInput)
        {
            // Update buttons state

            _hc.Update(gameTime, gameInput);
            _aventureBtn.Update(gameTime, gameInput);
            _level1Btn.Update(gameTime, gameInput);
            _level2Btn.Update(gameTime, gameInput);
            _quitBtn.Update(gameTime, gameInput);

            // Action
            if (_level1Btn.IsPressed()){
                ScoreHolder.clearLevel1();
                ScoreHolder.clearLevel2();
                _nextScene = new Level1(gameInput);
                _sceneFinished = true;

            }else if(_aventureBtn.IsPressed()){
                ScoreHolder.clearLevel1();
                ScoreHolder.clearLevel2();
                _nextScene = new Level1(gameInput, true);
                _sceneFinished = true;
            }
            else if (_level2Btn.IsPressed())
            {
                ScoreHolder.clearLevel1();
                ScoreHolder.clearLevel2();
                _nextScene = new Level2(gameInput);
                _sceneFinished = true;
            }
            else if (_quitBtn.IsPressed())
            {
                _nextScene = null; // Game will quit
                _sceneFinished = true;
            }
        }
Ejemplo n.º 3
0
        public override void Update(GameTime gameTime, KinectInterface gameInput)
        {
            // Update buttons state

            _hc = new HandCursors();

            _gameOverMsg.Update(gameTime, gameInput);
            _backToMenuBtn.Update(gameTime, gameInput);
            _continueBtn.Update(gameTime, gameInput);
            _quitBtn.Update(gameTime, gameInput);

            _hc.Update(gameTime, gameInput);

            // Action
            if (_backToMenuBtn.IsPressed())
            {
                _nextScene = new MainMenu();
                _sceneFinished = true;
            }
            else if (_continueBtn.IsPressed())
            {
                switch (_fromLevel)
                {
                    case 1: _nextScene = new Level1(gameInput);
                        break;
                    case 2: _nextScene = new Level2(gameInput);
                        break;
                    default: _nextScene = null;
                        break;
                }

                _sceneFinished = true;
            }
            else if (_quitBtn.IsPressed())
            {
                _nextScene = null; // Game will quit
                _sceneFinished = true;
            }
        }