Exemplo n.º 1
0
        private IEnumerator SwitchCoroutine()
        {
            do
            {
                yield return(StartCoroutine(SceneRoot.LoadSceneCoroutine(sceneList[sceneIndex], SceneLoadCallback)));

                sceneIndex = (sceneIndex + 1) % sceneList.Count;
                yield return(new WaitForSeconds(delayTime));
            } while (true);
        }
Exemplo n.º 2
0
        private void SceneLoadCallback(SceneRoot sceneRoot)
        {
            if (activeScene != null)
            {
                activeScene.StopScene();
                activeScene.UnloadScene();
            }

            activeScene = sceneRoot;
            activeScene.StartScene(false);
        }