Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- when skill used:
- timePassed = 0
- every frame:
- timePassed += delta;
- if timePassed >= duration:
- remove buff or whatever
- if timePassed >= cooldown:
- we can use again
- how long until skill ends = duration - timePassed
- how long until we can use again = cooldown - timePassed
- how far % wise into duration are we = timePassed / duration
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement