I want to pause/unpause animation for particular sprite when proper message appears. I would do this by CCNode::stopAllActions()
but it cancels all the animations which are then meant to set up again. I just want to do it in a quick pause/unpasue way. Anyone have a clue for efficitne way on this subject?
Asked
Active
Viewed 3,815 times
2

pro_metedorr
- 115
- 2
- 7
2 Answers
7
[yourSprite pauseSchedulerAndActions]
and to resume
[yourSprite resumeSchedulerAndActions]

tassinari
- 2,313
- 2
- 24
- 32
3
Accepted answer didn't work for me? Any body know why? This worked for me
#import "CCActionManager.h"
[[CCActionManager sharedManager] pauseAllActionsForTarget:spriteObj];
[[CCActionManager sharedManager] resumeAllActionsForTarget:spriteObj];

Warif Akhand Rishi
- 23,920
- 8
- 80
- 107