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 Release() { _aimingEnabled = false; _inputHandler.OnUp(Camera.main.WorldToScreenPoint(_checkerTarget.transform.position)); }