Exemplo n.º 1
0
 public void IncreaseHealth(float recovery)
 {
     CurrentHealth += recovery;
     // If we later have some sort of healing make sure that it cannot go over its initial full health.
     CurrentHealth = Mathf.Clamp(CurrentHealth, 0, MaxHealth);
     //if (this.currentHealth >= this.health) { this.currentHealth = this.health; }
     UnitGameObject.UpdateHealthText();
 }
Exemplo n.º 2
0
 public void DecreaseHealth(float damage)
 {
     CurrentHealth -= damage;
     UnitGameObject.UpdateHealthText();
 }