Esempio n. 1
0
 public void TakeDamage()
 {
     if (!dmg_done)
     {
         return;
     }
     dmg_done     = false;
     screw_amount = 0;
     plus_tool.ChangeScrews(0);
     minus_tool.ChangeScrews(0);
     health--;
     healthbar.SetHearts(health);
     source.clip = damage;
     source.Play();
     if (health <= 0)
     {
         GameOver();
         return;
     }
     StartCoroutine(FlashRed());
     StartCoroutine(DmgCD());
 }