Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IEnumerator Attack()
- {
- while (true)
- {
- if (agent.remainingDistance > attackDistance)
- {
- ResumeMove();
- yield break; // leaving corout' there
- }
- PlayAttackAnimation();
- yield return new WaitForSeconds(attackCooldown);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment