This commit is contained in:
Sveske Juice 2024-02-03 17:57:37 -08:00
parent b6be35168e
commit dbef2ea752
1 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@ using UnityEngine.AI;
public class EnemyAnimationHandler : MonoBehaviour
{
Animator animator;
bool isDying = false;
void Start()
{
animator = GetComponent<Animator>();
@ -20,6 +21,7 @@ public class EnemyAnimationHandler : MonoBehaviour
//GetComponent<NavMeshAgent>().enabled = false;
if (!isDying)
StartCoroutine(AnimationDie());
isDying = true;
}
IEnumerator AnimationDie()