コード例 #1
0
ファイル: SceneHandler.cs プロジェクト: VRCMG/CumLoader
 private static void CheckForSceneInitialized()
 {
     if (HasFinishedLoading)
     {
         CumHandler.OnLevelWasInitialized(LastSceneIndex);
         HasFinishedLoading = false;
     }
 }
コード例 #2
0
ファイル: SceneHandler.cs プロジェクト: VRCMG/CumLoader
 private static void CheckForSceneFinishedLoading()
 {
     if (IsLoading)
     {
         CumHandler.OnLevelWasLoaded(LastSceneIndex);
         HasFinishedLoading = true;
         IsLoading          = false;
     }
 }
コード例 #3
0
 void Update()
 {
     transform.SetAsLastSibling();
     if (Main.CurrentScene != Application.loadedLevel)
     {
         SceneHandler.OnSceneLoad(Application.loadedLevel);
         Main.CurrentScene = Application.loadedLevel;
     }
     CumHandler.OnUpdate();
 }
コード例 #4
0
 void OnApplicationQuit()
 {
     Destroy(); CumHandler.OnApplicationQuit();
 }
コード例 #5
0
 void OnGUI() => CumHandler.OnGUI();
コード例 #6
0
 void LateUpdate() => CumHandler.OnLateUpdate();
コード例 #7
0
 void FixedUpdate() => CumHandler.OnFixedUpdate();
コード例 #8
0
ファイル: Main.cs プロジェクト: VRCMG/CumLoader
 void FixedUpdate()
 {
     CumHandler.OnFixedUpdate();
     CumCoroutines.ProcessWaitForFixedUpdate();
 }
コード例 #9
0
ファイル: Main.cs プロジェクト: VRCMG/CumLoader
 void Update()
 {
     transform.SetAsLastSibling();
     CumHandler.OnUpdate();
     CumCoroutines.Process();
 }
コード例 #10
0
ファイル: SceneHandler.cs プロジェクト: VRCMG/CumLoader
        public static void OnSceneLoad(int current_scene)
        {
            bool should_run = true;

            if (Imports.IsIl2CppGame())
            {
                if (CumLoaderBase._IsBoneworks)
                {
                    if (!Boneworks_HasGotLoadingSceneIndex)
                    {
                        if (current_scene != 0)
                        {
                            Boneworks_LoadingSceneIndex       = current_scene;
                            Boneworks_HasGotLoadingSceneIndex = true;
                            should_run = false;
                        }
                        else
                        {
                            LastSceneIndex = current_scene;
                            IsLoading      = true;
                            should_run     = false;
                        }
                    }
                    else
                    {
                        if (current_scene == -1)
                        {
                            should_run = false;
                        }
                        else
                        {
                            if (current_scene == Boneworks_LoadingSceneIndex)
                            {
                                ShouldWait = true;
                            }
                            else
                            {
                                LastSceneIndex = current_scene;
                                IsLoading      = true;
                                should_run     = false;
                                ShouldWait     = false;
                            }
                        }
                    }
                }
            }
            if (should_run)
            {
                LastSceneIndex = current_scene;
                if (!ShouldWait)
                {
                    IsLoading = true;
                }
                if (CumLoaderBase._IsBoneworks)
                {
                    CumHandler.OnLevelIsLoading();
                }
                else
                {
                    CheckForSceneFinishedLoading();
                }
            }
        }