void Update() { float currentTimeRatio = GameController.instance.GetFamineTimeRemaining() / GameController.instance.famineTimerBase; if (currentTimeRatio < colorStages[currentStage].threshold && currentStage + 1 < colorStages.Count) { currentStage++; UpdateColorStage(); } // update the bar bar.SetValue(currentTimeRatio); }
public void UpdateGrowthBar() { float ratio = timer / nextGrowthTime; growthBar.SetValue(ratio); }