private void Update() { if (_state == GameState.PLAY) { _turnSwitcher.UpdateState(); } if (Input.GetMouseButtonDown(0) && _turnSwitcher.GetActiveColorSide() == _turnSwitcher.PlayerCheckerColor) { _inputHandler.OnDown(Input.mousePosition); } if (Input.GetMouseButtonUp(0) && _turnSwitcher.GetActiveColorSide() == _turnSwitcher.PlayerCheckerColor) { _inputHandler.OnUp(Input.mousePosition); } if (_state == GameState.PLAY) { _playerAI.Aiming(); } }
private void Press() { _aimingEnabled = true; _inputHandler.OnDown(Camera.main.WorldToScreenPoint(_checkerPush.transform.position)); }