SimplyKiwi
SimplyKiwi

Reputation: 12444

Adding a CADisplayLink to Cocos2D

I have Cocos2D in my app and I use it as the game engine for my game. At this point I need to have a game loop fire at the rate the screen refreshes. So this leads me to think that I need to use CADisplayLink. So how would I implement CADisplayLink so that my game loop which will consist of Cocos2D will be called at the rate of the screen refreshing?

Thanks!

Upvotes: 0

Views: 282

Answers (1)

CodeSmile
CodeSmile

Reputation: 64477

Cocos2D has the CADisplayLink object already integrated. In fact, it will be using CCDirectorDisplayLink by default unless you have specified a different director type.

Check your project's AppDelegate class, in particular the didFinishLaunching… method.

Upvotes: 1

Related Questions