public Timer CreateTimer(float seconds, Timer.Callback callback) { var t = new Timer(this, seconds, callback); timers_.Add(t); return(t); }
/// <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); } }
public Timer CreateTimer(float seconds, Timer.Callback f) { return(timers_.CreateTimer(seconds, f)); }