示例#1
0
 private void TickScheduler(int numTicks)
 {
     while (numTicks > 0)
     {
         numTicks--;
         currentTick++;
         scheduler.Tick(currentTick);
     }
 }
 public void OnTick()
 {
     if (initializationInProgress)
     {
         return;
     }
     try {
         var currentTick = Find.TickManager.TicksGame;
         for (int i = 0; i < childMods.Count; i++)
         {
             try {
                 childMods[i].Tick(currentTick);
             } catch (Exception e) {
                 Logger.ReportException(e, childMods[i].ModIdentifier, true);
             }
         }
         TickDelayScheduler.Tick(currentTick);
         DistributedTicker.Tick(currentTick);
     } catch (Exception e) {
         Logger.ReportException(e, null, true);
     }
 }
示例#3
0
 internal void OnTick()
 {
     if (initializationInProgress)
     {
         return;
     }
     try {
         DoLater.OnTick();
         var currentTick = Find.TickManager.TicksGame;
         for (int i = 0; i < initializedMods.Count; i++)
         {
             try {
                 initializedMods[i].Tick(currentTick);
             } catch (Exception e) {
                 Logger.ReportException(e, initializedMods[i].LogIdentifierSafe, true);
             }
         }
         TickDelayScheduler.Tick(currentTick);
         DistributedTicker.Tick(currentTick);
     } catch (Exception e) {
         Logger.ReportException(e, null, true);
     }
 }