protected virtual void MoveProcess(Rigidbody input)
        {
            Vector3 moveDirection = MovementInput.MoveDirection();
            Vector3 velocity      = new Vector3(moveDirection.x * MoveData.moveSpeed, input.velocity.y,
                                                moveDirection.z * MoveData.moveSpeed);

            input.velocity = velocity;
        }
Пример #2
0
        public bool IsAttack()
        {
            if (_movementInput.MoveDirection() != Vector3.zero)
            {
                return(false);
            }

            var closestTarget = _locator.GetClosestCollider();

            return(closestTarget != null &&
                   IsHeroLookToTarget());
        }