diff --git a/Scripts/Controls/CooldownButton.cs b/Scripts/Controls/CooldownButton.cs index d1c0e05..56b98f8 100644 --- a/Scripts/Controls/CooldownButton.cs +++ b/Scripts/Controls/CooldownButton.cs @@ -139,6 +139,16 @@ namespace UnityEngine.UI.Extensions } } + /// + /// Start a cooldown from outside + /// + public void StartCooldown() + { + if(OnCooldownStart != null) OnCooldownStart.Invoke(eventData.button); + cooldownTimeRemaining = cooldownTimeout; + cooldownActive = cooldownInEffect = true; + } + /// /// Stop a running Cooldown and reset all values ///