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.
精彩评论