示例#1
0
    private IEnumerator ShowLoadingAnim()
    {
        loadingView.gameObject.SetActive(true);
        float time = 0;

        while (time < 2)
        {
            yield return(new WaitForFixedUpdate());

            time += Time.fixedDeltaTime;
            loadingView.SetBarFillAmount(time / 2);
        }

        while (isLoading)
        {
            yield return(new WaitForFixedUpdate());
        }
        ContinueGame();
        loadingView.gameObject.SetActive(false);
        countDownView.gameObject.SetActive(true);
    }