Exemple #1
0
 public void OnGUI()
 {
     try
     {
         if (!this.destroyed)
         {
             GUI.depth = 50;
             UI.ApplyUIScale();
             LongEventHandler.LongEventsOnGUI();
             if (LongEventHandler.ShouldWaitForEvent)
             {
                 ScreenFader.OverlayOnGUI(new Vector2((float)UI.screenWidth, (float)UI.screenHeight));
             }
             else
             {
                 this.uiRoot.UIRootOnGUI();
                 ScreenFader.OverlayOnGUI(new Vector2((float)UI.screenWidth, (float)UI.screenHeight));
             }
         }
     }
     catch (Exception e)
     {
         Log.Notify_Exception(e);
         throw;
     }
 }
Exemple #2
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;
     }
 }
Exemple #3
0
 public override void Update()
 {
     base.Update();
     if (!LongEventHandler.ShouldWaitForEvent && !base.destroyed)
     {
         try
         {
             ShipCountdown.ShipCountdownUpdate();
             Current.Game.UpdatePlay();
             this.musicManagerPlay.MusicUpdate();
         }
         catch (Exception e)
         {
             Log.Notify_Exception(e);
             throw;
         }
     }
 }