I am developing a 2D iPhone game by using cocos2d. I need a countdown timer. How can I create a count down timer in cocos2d?
http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:best_practices
- Try NOT to use Cocoa’s NSTimer. Instead use cocos2d’s own scheduler.
- If you use cocos2d scheduler, you will have:
- automatic pause/resume.
- when the Layer (Scene, Sprite, CocosNode) enters the stage the timer will be automatically activated, and when it leaves the stage it will be automatically deactivated.
- Your target/selector will be called with a delta time...