Exemple #1
0
 public TimerDelayed(float secondsDelay, float secondsLoop,
                     Timer.FinishedHandler loopFinishedCallback = null)
 {
     this.loopFinishedCallback = loopFinishedCallback;
     timerDelay = new Timer(secondsDelay, TimerDelay_Finished, false);
     timerLoop  = new Timer(secondsLoop, loopFinishedCallback, true);
 }
 public CompTimerActionCooldown(float secondsAction, float secondsCooldown,
                                Timer.FinishedHandler actionFinishedCallback   = null,
                                Timer.FinishedHandler cooldownFinishedCallback = null)
 {
     this.actionFinishedCallback = actionFinishedCallback;
     timerAction   = new Timer(secondsAction, TimerActionCallback, false);
     timerCooldown = new Timer(secondsCooldown, cooldownFinishedCallback, false);
 }
Exemple #3
0
 // Other components can use these methods to subscribe to timer events.
 public void SubscribeToFinished(Timer.FinishedHandler Callback)
 {
     TimerFinished += Callback;
 }