void Update()
    {
        float newSliderValue = (float)_shipHitpoints.GetCurrentHitpoints() / 100;

        _slider.value = newSliderValue;
    }
Beispiel #2
0
 void Start()
 {
     _text.text = preText + " " + _shipHitpoints.GetCurrentHitpoints() + "/" + _shipHitpoints.GetMaximumHitpoints();
 }