Cocos2d-x Lua ProgressTimer: Build a Radial Skill Cooldown
Environment: Cocos2d-x 3.17
Language: Lua
Create a Radial ProgressTimer
Radial progress indicators are commonly used for skill cooldowns:
| |
setReverseDirection(true) reverses the radial direction. Animate the percentage from 100 to 0, or from 0 to 100 depending on the overlay artwork and desired visual:
| |
Keep a reference if the cooldown must be cancelled, reset, or synchronized with server state.