Exemplo n.º 1
0
 public void Die()
 {
     health = 0;
     shape.SetActive(false);
     colliders.SetActive(false);
     if (sfxDie)
     {
         Instantiate(sfxDie, transform.position, transform.rotation);
     }
     if (lifeHandler == null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         lifeHandler.LoseLife();
     }
 }