public bool AddHP(float value) { hp += value; hp = Mathf.Clamp(hp, 0, hpMax); if (unitUI != null) { unitUI.SetPrimary(hp / hpMax); } return(hp > 0); }