fix err
This commit is contained in:
parent
b6be35168e
commit
dbef2ea752
|
@ -6,6 +6,7 @@ using UnityEngine.AI;
|
||||||
public class EnemyAnimationHandler : MonoBehaviour
|
public class EnemyAnimationHandler : MonoBehaviour
|
||||||
{
|
{
|
||||||
Animator animator;
|
Animator animator;
|
||||||
|
bool isDying = false;
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
animator = GetComponent<Animator>();
|
animator = GetComponent<Animator>();
|
||||||
|
@ -20,6 +21,7 @@ public class EnemyAnimationHandler : MonoBehaviour
|
||||||
//GetComponent<NavMeshAgent>().enabled = false;
|
//GetComponent<NavMeshAgent>().enabled = false;
|
||||||
if (!isDying)
|
if (!isDying)
|
||||||
StartCoroutine(AnimationDie());
|
StartCoroutine(AnimationDie());
|
||||||
|
isDying = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator AnimationDie()
|
IEnumerator AnimationDie()
|
||||||
|
|
Loading…
Reference in New Issue