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; } }
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; } }