Ejemplo n.º 1
0
 // perhaps have armor on stuff?
 public void TakeDamage(int damage)
 {
     health -= damage > armor ? damage - armor : 0;
     unitUI.SetContent(this);
     if (health <= 0)
     {
         Destroy(this);
     }
 }