Beispiel #1
0
        public Timer CreateTimer(float seconds, Timer.Callback callback)
        {
            var t = new Timer(this, seconds, callback);

            timers_.Add(t);
            return(t);
        }
Beispiel #2
0
 /// <param name="cooldownPeriod">How long this cooldown will take</param>
 /// <param name="startOnCooldown">Whether the cooldown should be active immediately</param>
 public Cooldown(float cooldownPeriod, bool startOnCooldown = false, Timer.Callback onFinished = null)
 {
     countdown = new Countdown(cooldownPeriod);
     if (!startOnCooldown)
     {
         countdown.Finish();
     }
     if (onFinished != null)
     {
         this.countdown.SetCallback(onFinished);
     }
 }
Beispiel #3
0
 public Timer CreateTimer(float seconds, Timer.Callback f)
 {
     return(timers_.CreateTimer(seconds, f));
 }