示例#1
0
 private void Dead()
 {
     DeathEffect();
     DeathEvent.EnemyDiedShake();
     DeathEvent.EnemyDied(xp);
     GetComponent <IReset>().OnDeathReset();
     gameObject.SetActive(false);
 }
示例#2
0
 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;
 }