Beispiel #1
0
        /// <summary>
        /// 重置环境
        /// </summary>
        IEnumerator doReset()
        {
            svrManager.SetOverlayFade(SvrManager.eFadeState.FadeOut);
            yield return(new WaitUntil(() => svrManager.IsOverlayFading() == false));

            svrManager.Shutdown();
            yield return(new WaitUntil(() => svrManager.Initialized == false));

            SceneManager.LoadScene(sceneIndex);
            System.GC.Collect();
        }
Beispiel #2
0
    public IEnumerator HandleQuit()
    {
        svrManager.SetOverlayFade(SvrManager.eFadeState.FadeOut);
        yield return(new WaitUntil(() => svrManager.IsOverlayFading() == false));

        Application.Quit();

        HandleBack = null;
    }
Beispiel #3
0
    IEnumerator HandleBackButton()
    {
        svrManager.SetOverlayFade(SvrManager.eFadeState.FadeOut);
        yield return(new WaitUntil(() => svrManager.IsOverlayFading() == false));

        // Load next scene in build settings, quit when done
        if (++sceneIndex < SceneManager.sceneCountInBuildSettings)
        {
            svrManager.Shutdown();
            yield return(new WaitUntil(() => svrManager.Initialized == false));

            SceneManager.LoadScene(sceneIndex);

            System.GC.Collect();
        }
        else
        {
            sceneIndex = -1;
            Application.Quit();
        }
    }