示例#1
0
    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);
    }
示例#2
0
    public void UpdateGrowthBar()
    {
        float ratio = timer / nextGrowthTime;

        growthBar.SetValue(ratio);
    }