Exemple #1
0
        /// <summary>
        /// Stops moving, faces the target if not facing yet, if facing, starts a hit.
        /// </summary>
        private void IsInRange()
        {
            _movable.StopMoving();
            Status = AttackStatus.TargetReached;
            // face target
            if (_movable.FaceTarget(_target.gameObject, true, out _))
            {
                // faces target
                // perform hit
                Status = AttackStatus.NotFinished;

                animator.SetTrigger(AttackTrigger);
            }
        }