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