private void ReviveAgent() { AgentGFX.enabled = true; AgentCollider.enabled = true; OnAgentArrive?.Invoke(this); CheckCoroutine = StartCoroutine(CheckAgentArrive()); }
//NPC가 목적지에 도착했는지 확인하는 코루틴 IEnumerator CheckAgentArrive() { yield return(CheckDelayTime); if (Vector3.Distance(transform.position, Agent.destination) < 3f) { OnAgentArrive?.Invoke(this); } CheckCoroutine = StartCoroutine(CheckAgentArrive()); }