Esempio n. 1
0
 public override void Die(int dam, Frezzeble killer)
 {
     hp -= dam;
     if (hp <= 0)
     {
         this.killer = killer;
         killer.frezze();
         hp = 0;
         AudioSource.PlayClipAtPoint(deathSound, transform.position);
         Alive         = false;
         rb2d.velocity = new Vector2(0, 0);
         Invoke("AfterDeath", 0.5f);
     }
 }
Esempio n. 2
0
 public virtual void Die(int dam, Frezzeble killer)
 {
     hp -= dam;
     if (hp <= 0)
     {
         this.killer = killer;
         hp          = 0;
         AudioSource.PlayClipAtPoint(deathSound, transform.position);
         Alive         = false;
         rb2d.velocity = new Vector2(0, 0);
         this.gameObject.SetActive(false);
         Invoke("AfterDeath", 0.5f);
     }
 }