コード例 #1
0
 public virtual void Update()
 {
     try
     {
         RealTime.Update();
         bool flag;
         LongEventHandler.LongEventsUpdate(out flag);
         if (flag)
         {
             this.destroyed = true;
         }
         else if (!LongEventHandler.ShouldWaitForEvent)
         {
             Rand.EnsureStateStackEmpty();
             SteamManager.Update();
             PortraitsCache.PortraitsCacheUpdate();
             this.uiRoot.UIRootUpdate();
             if (Time.frameCount > 3 && !Root.prefsApplied)
             {
                 Root.prefsApplied = true;
                 Prefs.Apply();
             }
             this.soundRoot.Update();
             MemoryTracker.Update();
         }
     }
     catch (Exception e)
     {
         Log.Notify_Exception(e);
         throw;
     }
 }
コード例 #2
0
ファイル: Root.cs プロジェクト: Chillu1/RimWorldDecompiledWeb
 public virtual void Update()
 {
     try
     {
         ResolutionUtility.Update();
         RealTime.Update();
         LongEventHandler.LongEventsUpdate(out var sceneChanged);
         if (sceneChanged)
         {
             destroyed = true;
         }
         else if (!LongEventHandler.ShouldWaitForEvent)
         {
             Rand.EnsureStateStackEmpty();
             Widgets.EnsureMousePositionStackEmpty();
             SteamManager.Update();
             PortraitsCache.PortraitsCacheUpdate();
             AttackTargetsCache.AttackTargetsCacheStaticUpdate();
             Pawn_MeleeVerbs.PawnMeleeVerbsStaticUpdate();
             Storyteller.StorytellerStaticUpdate();
             CaravanInventoryUtility.CaravanInventoryUtilityStaticUpdate();
             uiRoot.UIRootUpdate();
             if (Time.frameCount > 3 && !prefsApplied)
             {
                 prefsApplied = true;
                 Prefs.Apply();
             }
             soundRoot.Update();
         }
     }
     catch (Exception arg)
     {
         Log.Error("Root level exception in Update(): " + arg);
     }
 }
コード例 #3
0
 public virtual void Update()
 {
     try
     {
         ResolutionUtility.Update();
         RealTime.Update();
         bool flag;
         LongEventHandler.LongEventsUpdate(out flag);
         if (flag)
         {
             this.destroyed = true;
         }
         else if (!LongEventHandler.ShouldWaitForEvent)
         {
             Rand.EnsureStateStackEmpty();
             Widgets.EnsureMousePositionStackEmpty();
             SteamManager.Update();
             PortraitsCache.PortraitsCacheUpdate();
             AttackTargetsCache.AttackTargetsCacheStaticUpdate();
             Pawn_MeleeVerbs.PawnMeleeVerbsStaticUpdate();
             Storyteller.StorytellerStaticUpdate();
             CaravanInventoryUtility.CaravanInventoryUtilityStaticUpdate();
             this.uiRoot.UIRootUpdate();
             if (Time.frameCount > 3 && !Root.prefsApplied)
             {
                 Root.prefsApplied = true;
                 Prefs.Apply();
             }
             this.soundRoot.Update();
             try
             {
                 MemoryTracker.Update();
             }
             catch (Exception arg)
             {
                 Log.Error("Error in MemoryTracker: " + arg, false);
             }
             try
             {
                 MapLeakTracker.Update();
             }
             catch (Exception arg2)
             {
                 Log.Error("Error in MapLeakTracker: " + arg2, false);
             }
         }
     }
     catch (Exception arg3)
     {
         Log.Error("Root level exception in Update(): " + arg3, false);
     }
 }