Esempio n. 1
0
 public override void Update()
 {
     base.Update();
     if (!LongEventHandler.ShouldWaitForEvent && !this.destroyed)
     {
         try
         {
             Profiler.BeginSample("ShipCountdownUpdate()");
             ShipCountdown.ShipCountdownUpdate();
             Profiler.EndSample();
             Profiler.BeginSample("TargetHighlighterUpdate()");
             TargetHighlighter.TargetHighlighterUpdate();
             Profiler.EndSample();
             Profiler.BeginSample("Game.Update()");
             Current.Game.UpdatePlay();
             Profiler.EndSample();
             Profiler.BeginSample("MusicUpdate()");
             this.musicManagerPlay.MusicUpdate();
             Profiler.EndSample();
         }
         catch (Exception arg)
         {
             Log.Error("Root level exception in Update(): " + arg, false);
         }
     }
 }
 public override void PreOpen()
 {
     base.PreOpen();
     ConceptDatabase.Save();
     ShipCountdown.CancelCountdown();
     this.anyWorldFiles = SavedWorldsDatabase.AllWorldFiles.Any <FileInfo>();
     this.anyMapFiles   = MapFilesUtility.AllMapFiles.Any <FileInfo>();
 }
Esempio n. 3
0
 public static void Init()
 {
     if (!PlayDataLoader.loaded)
     {
         PlayDataLoader.LoadAllPlayData(false);
     }
     ConceptDatabase.Save();
     ShipCountdown.CancelCountdown();
     MainMenuDrawer.anyWorldFiles = SavedWorldsDatabase.AllWorldFiles.Any <FileInfo>();
     MainMenuDrawer.anyMapFiles   = MapFilesUtility.AllMapFiles.Any <FileInfo>();
 }
Esempio n. 4
0
        // Moved from RimWorld.ShipCountdown because the original one is called from Update
        private static void TickShipCountdown()
        {
            if (ShipCountdown.timeLeft > 0f)
            {
                ShipCountdown.timeLeft -= 1 / 60f;

                if (ShipCountdown.timeLeft <= 0f)
                {
                    ShipCountdown.CountdownEnded();
                }
            }
        }
Esempio n. 5
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;
         }
     }
 }
Esempio n. 6
0
 public override void Update()
 {
     base.Update();
     if (!LongEventHandler.ShouldWaitForEvent && !destroyed)
     {
         try
         {
             ShipCountdown.ShipCountdownUpdate();
             TargetHighlighter.TargetHighlighterUpdate();
             Current.Game.UpdatePlay();
             musicManagerPlay.MusicUpdate();
         }
         catch (Exception arg)
         {
             Log.Error("Root level exception in Update(): " + arg);
         }
     }
 }
Esempio n. 7
0
 private static void ForceShipCountdown()
 {
     ShipCountdown.InitiateCountdown((Building)null);
 }