示例#1
0
 public void SetMaxHealth(int maxHealth, bool setHealth = true)
 {
     _maxHealth = maxHealth;
     if (setHealth)
     {
         _health = _maxHealth;
     }
     OnHealthMaxChanged?.Invoke(this, EventArgs.Empty);
 }
示例#2
0
 public void SetHealthMax(int healthMax, bool fullHealth)
 {
     this.healthMax = healthMax;
     if (fullHealth)
     {
         health = healthMax;
     }
     OnHealthMaxChanged?.Invoke(this, EventArgs.Empty);
     OnHealthChanged?.Invoke(this, EventArgs.Empty);
 }