开发者

syncing sound with CCAnimation

I have a CCSpeed that contains a CCAnimation that dynamically changes it's speed based on stuff that's going on in the game. Is there any way i can get the 开发者_开发问答animation to call a selector each time the animation "ticks" (switches frame), in this specific case, in order to play a sound?

Edit: Other solutions to sync the animation ticks with sound are welcome as well


I wonder if QuartzCore/CADisplayLink might be what you're looking for.

You can create one with -[UIScreen - displayLinkWithTarget:selector: ]

You can get a callback for every screen refresh (VBL) cycle.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜