/// <summary> /// Constructor. /// </summary> /// <param name="Timer">The c# timer that controls the cooldown.</param> /// <param name="Value">The max value for the cooldown.</param> /// <param name="DecrementAmount">The value to decrement the cooldown each time the timer expires.</param> public TimedCooldown(CSTimer Timer, double Value, double DecrementAmount) : base(Value, DecrementAmount) { this.timer = Timer; this.timer.timer.Elapsed += DecrementValue; }
/// <summary> /// Constructor. /// </summary> /// <param name="NumberOfMilliseconds">The number of milliseconds for the timer until it expires.</param> /// <param name="Value">The value for the cooldown.</param> /// <param name="DecrementAmount">The value to decrement the cooldown each time the timer expires.</param> public TimedCooldown(int NumberOfMilliseconds, double Value, double DecrementAmount) : base(Value, DecrementAmount) { this.timer = new CSTimer(NumberOfMilliseconds, true, DecrementValue); }