Esempio n. 1
0
 public void InitPawnTimers()
 {
     foreach (Pawn pawn in saveGame.pawnWallet.pawns)
     {
         if (pawn != null && pawn.unlockTime > 0)
         {
             timerCounter.SetTimer(pawn.GetTimerID(), pawn.unlockTime);
         }
     }
     foreach (Pawn pawn in saveGame.pawnWallet.extraPawns)
     {
         if (pawn != null && pawn.unlockTime > 0)
         {
             timerCounter.SetTimer(pawn.GetTimerID(), pawn.unlockTime);
         }
     }
     timerCounter.UpdateTimersSinceLastClosed();
 }
Esempio n. 2
0
 /// <summary>
 /// Resets the timer. Should be called every time <see cref="timeUntilNextReward"/> is modified.
 /// </summary>
 private void ResetTimer()
 {
     timerCounter.SetTimer(TIMER_KEY, timeUntilNextReward, UpdateRewards);
     timerView.timer = timerCounter.GetTimer(TIMER_KEY);
 }