예제 #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 arg)
     {
         Log.Error("Root level exception in OnGUI(): " + arg, false);
     }
 }
예제 #2
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;
     }
 }
예제 #3
0
 public void OnGUI()
 {
     try
     {
         if (destroyed)
         {
             return;
         }
         GUI.depth = 50;
         UI.ApplyUIScale();
         LongEventHandler.LongEventsOnGUI();
         if (LongEventHandler.ShouldWaitForEvent)
         {
             ScreenFader.OverlayOnGUI(new Vector2(UI.screenWidth, UI.screenHeight));
             return;
         }
         uiRoot.UIRootOnGUI();
         ScreenFader.OverlayOnGUI(new Vector2(UI.screenWidth, UI.screenHeight));
         if (Find.CameraDriver != null && Find.CameraDriver.isActiveAndEnabled)
         {
             Find.CameraDriver.CameraDriverOnGUI();
         }
         if (Find.WorldCameraDriver != null && Find.WorldCameraDriver.isActiveAndEnabled)
         {
             Find.WorldCameraDriver.WorldCameraDriverOnGUI();
         }
     }
     catch (Exception arg)
     {
         Log.Error("Root level exception in OnGUI(): " + arg);
     }
 }