From dbef2ea752a599f0b57bf61f36c8211e96ad01e3 Mon Sep 17 00:00:00 2001 From: Sveske Juice Date: Sat, 3 Feb 2024 17:57:37 -0800 Subject: [PATCH] fix err --- Assets/Scripts/Enemy/EnemyAnimationHandler.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/Scripts/Enemy/EnemyAnimationHandler.cs b/Assets/Scripts/Enemy/EnemyAnimationHandler.cs index 50dede7..3c902f3 100644 --- a/Assets/Scripts/Enemy/EnemyAnimationHandler.cs +++ b/Assets/Scripts/Enemy/EnemyAnimationHandler.cs @@ -6,6 +6,7 @@ using UnityEngine.AI; public class EnemyAnimationHandler : MonoBehaviour { Animator animator; + bool isDying = false; void Start() { animator = GetComponent(); @@ -20,6 +21,7 @@ public class EnemyAnimationHandler : MonoBehaviour //GetComponent().enabled = false; if (!isDying) StartCoroutine(AnimationDie()); + isDying = true; } IEnumerator AnimationDie()