I am working on a sidescroller game in cocos2d. I have a CCAction derived from a CCAnimation that runs on a CCSprite. I run the CCAction with CCRepeatForever, but I’m not able to change the animation frame rate while the action is being performed. How can I achieve this goal?
Asked
Active
Viewed 104 times
0
-
Can you show your codes? – Raptor Aug 30 '13 at 08:49
-
You have to stop whichever animation running on sprite and then initialize new CCAction with new animation frame rate and run that on sprite. – Renaissance Aug 30 '13 at 09:48
-
use CCSpeed which affects the speed of its inner actions – CodeSmile Aug 30 '13 at 12:53
-
because the animation is quite short, I solved the issue simply by changing the frame rate whenever the loop ended and restarted the animation right after. Thank you anyways for the replies! – SandPhoenix Aug 30 '13 at 18:12