How to pause and unpause the Particular action of a sprite?

Posted by user1609578 on Game Development See other posts from Game Development or by user1609578
Published on 2014-06-05T08:45:18Z Indexed on 2014/06/06 3:42 UTC
Read the original article Hit count: 154

Filed under:
|
|

My game has a sprite representing a character. When the character picks up an item, the sprite should stop moving for a period of time.

I use CCbezier to make the sprite move, like this:

sprite->runaction(x)

Now I want the sprite to stop its current action (moving) and later resume it. I can make the sprite stop by using:

sprite->stopaction(x)

but if I do that, I can't resume the movement. How can I do that?

© Game Development or respective owner

Related posts about cocos2d-iphone

Related posts about cocos2d