Esempio n. 1
0
 void IDamageable.Damage(int amount)
 {
     health -= amount;
     HUDManager.Instance.UpdateLifeBar(health);
     if (health == 0)
     {
         playerAnim.SetDeathTrigger();
         Invoke("EnableDeathScreen", 1.5f);
     }
     else if (health > 0)
     {
         playerAnim.SetHitTrigger();
     }
 }