Exemplo n.º 1
0
    protected IEnumerator UpdateLoadingBar(UiPnlLoading loading)
    {
        int safeGuard = 0;

        loading.SetSliderValue(0f);
        while (loading.loadingProgress.CurrentAsyncLoadingProgress < 1f)
        {
            loading.SetSliderValue(loading.loadingProgress.CurrentAsyncLoadingProgress);
            safeGuard++;
            if (safeGuard >= 25 * 1000 / 33)
            {
                break;
            }
            yield return(null);
        }
        loading.SetSliderValue(1f);
        yield return(null);
    }
Exemplo n.º 2
0
 protected void StartLoadingBarUpdateCoroutine(UiPnlLoading loading)
 {
     StopCoroutine("UpdateLoadingBar");
     StartCoroutine(UpdateLoadingBar(loading));
 }