public void Die() { if (!IsDead()) { return; } zombieAI.SetUpNavMeshAgent(false); zombieAI.enabled = false; if (KilledByKnife == true) { animator.SetBool("dieFromKnife", true); } else { animator.SetBool("Died", true); } GetComponent <AudioSource>().Stop(); Destroy(gameObject, 5); }