Beispiel #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);
        }
Beispiel #2
0
        private void SceneLoadCallback(SceneRoot sceneRoot)
        {
            if (activeScene != null)
            {
                activeScene.StopScene();
                activeScene.UnloadScene();
            }

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