Пример #1
0
 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
 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();
         }
     }
 }