From c32eabcdff26a08171ef6fd26233effae15b0910 Mon Sep 17 00:00:00 2001 From: XtraCube <72575280+XtraCube@users.noreply.github.com> Date: Fri, 3 Jan 2025 19:05:00 -0500 Subject: [PATCH] add InitialCooldown property to buttons --- MiraAPI/Hud/CustomActionButton.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MiraAPI/Hud/CustomActionButton.cs b/MiraAPI/Hud/CustomActionButton.cs index 4799f2e..70996b2 100644 --- a/MiraAPI/Hud/CustomActionButton.cs +++ b/MiraAPI/Hud/CustomActionButton.cs @@ -19,6 +19,11 @@ public abstract class CustomActionButton /// public abstract string Name { get; } + /// + /// Gets the initial cooldown duration in seconds. + /// + public virtual float InitialCooldown => Cooldown; + /// /// Gets the button's cooldown duration in seconds. /// @@ -82,7 +87,7 @@ public abstract class CustomActionButton } UsesLeft = MaxUses; - Timer = Cooldown; + Timer = InitialCooldown; EffectActive = false; Button = Object.Instantiate(HudManager.Instance.AbilityButton, parent);