7 internal static class HealingCooldown
9 public static float NormalizedCooldown => MathF.Min((
float) (DateTimeOffset.UtcNow - OnCooldownUntil).TotalSeconds / CooldownDuration, 0f);
10 public static bool IsOnCooldown => DateTimeOffset.UtcNow < OnCooldownUntil;
12 private static DateTimeOffset OnCooldownUntil = DateTimeOffset.MinValue;
13 private const float CooldownDuration = 0.5f;
15 public static void PutOnCooldown()
17 OnCooldownUntil = DateTimeOffset.UtcNow.AddSeconds(CooldownDuration);