Sets up the parameters for a Cooldown model.. Note: Most
Cooldown animations in the default UI are managed via the function
CooldownFrame_SetTimer(self, start, duration, enable), a wrapper for this method which automatically shows the
Cooldown element while animating and hides it otherwise.
Signature:
Code
Cooldown:SetCooldown(start, duration)
Arguments:
- start - Value of GetTime() at the start of the cooldown animation (number)
- duration - Duration of the cooldown animation (excluding that of the final "flash" animation) (number)
Examples:
-- creates a Cooldown object over the player portrait
CreateFrame("Cooldown","PlayerCooldown",PlayerFrame)
PlayerCooldown:SetAllPoints(PlayerPortrait)
-- performs a complete cooldown "sweep" animation over 10 seconds
PlayerCooldown:SetCooldown(GetTime(), 10)
-- performs the same animation, starting halfway in (5 seconds)
PlayerCooldown:SetCooldown(GetTime() - 5, 10)
-- performs only the "flash" animation normally seen at the end of a cooldown
PlayerCooldown:SetCooldown(0,0)