예제 #1
0
파일: Main.cs 프로젝트: morag12/MelonLoader
 internal static void OnUpdate()
 {
     if (IsInitialized)
     {
         if (was_level_loaded)
         {
             OnLevelWasInitialized(level_loaded_index);
             was_level_loaded   = false;
             level_loaded_index = -1;
         }
         if (Imports.IsIl2CppGame())
         {
             if (IsVRChat)
             {
                 VRChat_CheckUiManager();
             }
             if (!Imports.IsMUPOTMode())
             {
                 CheckForSceneChange();
             }
         }
         if (Mods.Count() > 0)
         {
             foreach (MelonMod mod in Mods)
             {
                 try { mod.OnUpdate(); } catch (Exception ex) { MelonModLogger.LogModError(ex.ToString(), mod.InfoAttribute.Name); }
             }
         }
         if (Imports.IsIl2CppGame() && !Imports.IsMUPOTMode())
         {
             MelonCoroutines.Process();
         }
     }
 }
예제 #2
0
파일: Main.cs 프로젝트: morag12/MelonLoader
 internal static void OnFixedUpdate()
 {
     if (IsInitialized)
     {
         if (Mods.Count() > 0)
         {
             foreach (MelonMod mod in Mods)
             {
                 try { mod.OnFixedUpdate(); } catch (Exception ex) { MelonModLogger.LogModError(ex.ToString(), mod.InfoAttribute.Name); }
             }
         }
         if (Imports.IsIl2CppGame() && !Imports.IsMUPOTMode())
         {
             MelonCoroutines.ProcessWaitForFixedUpdate();
         }
     }
 }