private void Dead() { DeathEffect(); DeathEvent.EnemyDiedShake(); DeathEvent.EnemyDied(xp); GetComponent <IReset>().OnDeathReset(); gameObject.SetActive(false); }
private void Die() { DeathEvent.EnemyDied(id); isAlive = false; GetComponent <Collider>().enabled = false; GetComponent <Animator>().SetTrigger("IsDead"); GetComponent <NavMeshAgent>().isStopped = true; GetComponent <NavMeshAgent>().enabled = false; enabled = false; }