/// <summary> /// Decreases the skills cooldown /// </summary> /// <param name="time">Time to decrement skill</param> public void DoCooldown(float time) { if (_currCooldown > 0) { _currCooldown -= time; if (_currCooldown <= 0) { OnCooldownEnd?.Invoke(); _currCooldown = 0; } } }
/// <summary> /// Invoke the end of cooldown for the current weapon when cooldown timer finishes /// </summary> public void InvokeCooldownEnd() => OnCooldownEnd?.Invoke();