예제 #1
0
        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();
            }
        }
예제 #2
0
 private void Press()
 {
     _aimingEnabled = true;
     _inputHandler.OnDown(Camera.main.WorldToScreenPoint(_checkerPush.transform.position));
 }