In my app I have a bunch of enemy characters that are moving by CCAnimations (CCActions). They are set to a certain animation speed, however at certain times I need to either increase or decrease the speed of the animation that are currently doing.
Now is this possible? I have looked around have seen nothing mentioned about it. Can anyone point me to somewhere that can explain how to do this or if you have any tips or advice on how to achieve this, that would be great!
It may be best to handle the animations yourself so you will have more control:
look up: setDisplayFrame or setDisplayFrameWithAnimationName
you can then control the speed and many other things (ie:sync animations w/other animations or sound)
Is that the only possible way? Do you have any links where I can see of an example in this?
I think it's possible to wrap multiple animations under the one action... create an animation for each speed that you need, and run them in a sequenceable action.
Haven't tried this myself, but in theory it should work!
@hareball Unfortunately I cannot do that. I know I said each is a certain speed but to elaborate, it is set to a random speed for each so each has their own 'certain' speed. Bottom line its a random float so it will most likely never be the same number twice.
Sorry for the confusion!
Look at this post pay attention to the animationInterval variable - you can set that to what ever you want.
Ok I'll look at it tomorrow. Ill post back if I have any questions!