void UpdateHealth() { var hp = _healthComp.GetHealth(); if (hp >= _healthComp.GetMaxHealth()) { _panel.fillAmount = minFillValue; } if (hp < _healthComp.GetMaxHealth()) { var amt = hp * fillAddValue; _panel.fillAmount = _panel.fillAmount + amt; } }