feat(cooldown-button): add a `StartCooldown` to start cooldown from outside
parent
37aec29aa0
commit
67c2da49b1
|
@ -139,6 +139,16 @@ namespace UnityEngine.UI.Extensions
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start a cooldown from outside
|
||||
/// </summary>
|
||||
public void StartCooldown()
|
||||
{
|
||||
if(OnCooldownStart != null) OnCooldownStart.Invoke(eventData.button);
|
||||
cooldownTimeRemaining = cooldownTimeout;
|
||||
cooldownActive = cooldownInEffect = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stop a running Cooldown and reset all values
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue