Esempio n. 1
0
        void OnUpEventHandler(Vector3 distance)
        {
            if (_pushed == null)
            {
                return;
            }
            if (_turnSwitcher.IsPossibleMakeMove() == false)
            {
                return;
            }
            if (((MonoBehaviour)_pushed).GetComponent <CheckerBase>().CheckerColor != _turnSwitcher.GetActiveColorSide())
            {
                return;
            }

            _pusher.SetForce(_forceCalculator.GetForce(distance));
            _pusher.Push(_pushed);
            _pushed = null;

            _turnSwitcher.Move();
        }