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; }
public bool IsAttack() { if (_movementInput.MoveDirection() != Vector3.zero) { return(false); } var closestTarget = _locator.GetClosestCollider(); return(closestTarget != null && IsHeroLookToTarget()); }