示例#1
0
    void Update()
    {
        float newSliderValue = (float)_shipHitpoints.GetCurrentHitpoints() / 100;

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