コード例 #1
0
    IEnumerator WaitForAnim(string loadScene)
    {
        TransitionScene _animMaster = FindObjectOfType <TransitionScene>();

        _animMaster.EndAnim();
        yield return(new WaitForSeconds(_animMaster._animTime));

        SceneManager.LoadScene(loadScene);
    }
コード例 #2
0
    IEnumerator WaitAnimCreditOn()
    {
        TransitionScene _animMaster = FindObjectOfType <TransitionScene>();

        _animMaster.EndAnim();
        yield return(new WaitForSeconds(_animMaster._animTime));

        //UI_Credits.SetActive(true);
        //UI_MainMenu.SetActive(false);
        SceneManager.LoadScene("TestCardJulien");
        yield return(new WaitForSeconds(_animMaster._animTime));

        _animMaster.StartAnim();
    }
コード例 #3
0
    IEnumerator LoadYourAsyncScene(string scene)
    {
        loadingScene = true;

        TransitionScene _animMaster = FindObjectOfType <TransitionScene>();

        _animMaster.EndAnim();
        yield return(new WaitForSeconds(_animMaster._animTime));

        AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(scene);

        // Wait until the asynchronous scene fully loads
        while (!asyncLoad.isDone)
        {
            yield return(null);
        }
    }