Can a CCSprite switch between multiple animations?

285 Views Asked by At

Is it possible to make a CCSprite switch between two different animations? (both are CCRepeatForever)

I try to use stopAction: and runAction: but it crashes the app. I can only use pauseSchedulerAndActions: and resumeSchedulerAndActions: with one animation.

1

There are 1 best solutions below

0
On

To answer your question: Yes. If switching animations troubles you, use one sprite for each animation and keep them all updated to the same position, and only set the one to visible whose animation should be played.

The crash is certainly unrelated.