コード例 #1
0
        public void HandleInput(Vector2?touchLocation = null)
        {
            switch (_currentState)
            {
            case GameStates.Menu:
                if (touchLocation == null)
                {
                    return;
                }

                _menu.HandleInput(touchLocation.Value, this);
                break;

            case GameStates.Playing:
                _game.HandleInput();
                break;

            case GameStates.GameOver:
                _gameOver.HandleInput(this);
                break;

            case GameStates.Score:
                SetMenuState();
                break;
            }
        }
コード例 #2
0
        public void HandleTouchInput(Vector2?touchLocation = null)
        {
            if (touchLocation == null)
            {
                return;
            }

            switch (_currentState)
            {
            case GameStates.Menu:
                _menu.HandleInput(touchLocation.Value);
                break;

            case GameStates.Playing:
                _game.HandleInput(touchLocation.Value);
                break;
            }
        }