Exemplo n.º 1
0
 public virtual void changeHealth(int ammount)
 {
     health += ammount;
     hp_bar.updateHealthBar(health, maxHealth);
     if (health > maxHealth)
     {
         health = maxHealth;
     }
     if (health <= 0)
     {
         die();
     }
 }