Pause code

Pause code
0.0 0


Hello. I’m trying to make a card game and ran into a problem. The moment when the enemy (computer) draws a card from the deck and immediately it lays down on the table.I can not figure out how to pause code execution. At this time, the movement of the sprite animation Draw a card in the computer.
Сode sleep () and pause () stops the execution, and code, and animation.

Q: how to stop the execution of code on a second, but not to stop the animation.

Sorry for my english please.


Maybe you can try CCActions?

CCDelayTime* delay = CCDelayTime::create(delayInSecs);
CCCallFunc* func = CCCallFunc::create(myFunc);
CCSequence* sequence = CCSequence::create(delay, func, NULL);

Sorry if there are syntax errors. I didn’t use an editor.