Esempio n. 1
0
    IEnumerator Grow()
    {
        while (isGrowing)
        {
            yield return(FixedWait);

            growPercent            += 0.5f * initialGrowSpeed * Mathf.Pow(speedMultiplierPerBag, bagCount);
            growBarImage.fillAmount = growPercent / 100f;
            if (growBarImage.fillAmount >= 1)
            {
                //tell tree to change model
                tc.GrowUpOneStage();
                isGrowing = false;
            }
        }
    }