예제 #1
0
        private static void LoadMainSceneRaw2(MainSceneInfo sceneInfo, out AsyncOperation operation)
        {
            operation = GetLoad(sceneInfo, LoadSceneMode.Single);

            operation.completed += (o) => OnLoadSceneCompleted(sceneInfo);

            var additional = sceneInfo.AdditionalStartScenes.Distinct(asi => asi.ScenePath);

            foreach (AdditiveSceneInfo asi in additional)
            {
                LoadAdditiveScene(asi);
            }
        }
예제 #2
0
        private static void LoadMainSceneRaw(MainSceneInfo sceneInfo, TransitionInfo transition)
        {
            OnExitScene?.Invoke();
            AsyncOperation operation = null;

            if (transition == null)
            {
                transition = DefaultTransition;
            }

            OnStartLoadingMainScene?.Invoke(() => {
                if (operation == null)
                {
                    return(0);
                }
                else
                {
                    if (operation.isDone)
                    {
                        return(1);
                    }
                    else
                    {
                        return(operation.progress);
                    }
                }
            }, transition);
            if (transition != null && transition.StartDurration > 0)
            {
                TimeSystem.Delay(transition.StartDurration, t => LoadMainSceneRaw2(sceneInfo, out operation));
            }
            else
            {
                LoadMainSceneRaw2(sceneInfo, out operation);
            }
        }
예제 #3
0
 private static void LoadMainScene(MainSceneInfo sceneInfo, TransitionInfo transition)
 {
     SaveAllData();
     LoadMainSceneRaw(sceneInfo, transition);
 }
예제 #4
0
 private static void LoadMainScene(MainSceneInfo sceneInfo)
 {
     LoadMainScene(sceneInfo, sceneInfo.Transition);
 }