schedule function after pauseSchedulerAndActions function calls ?

schedule function after pauseSchedulerAndActions function calls ?
0.0 0



I have an assert(pElement->paused == bPaused).

And I found that’s because I do an 0.5secs schedule function call after pauseSchedulerAndActions() calls.

So, how can I avoid kind of these potential errors ?

Thanks in advances.


I am sorry. I don’t catch your thought.



For example, my game has a time countdown, and after time count to 0, I will call pauseSchedulerAndActions to pause all the timer and actions.

And I also have some animation want to play after player touch some sprites. Something like player touch and delay 0.5s, I play the bomb animation.

What I implemented this delay animation is a scheduler after 0.5s and perform a function call.

At very extremely situations, the 0.5s delay scheduler will be executed after time count to 0, that’s mean after pauseSchedulerAndActions, and I will get an assert like I said above.

I don’t know if this is my logic problem or there is something I check before I call the 0.5s delay scheduler ?

If the answer is yes, please show me some informations about that, I will be very appreciated.

Thank you again, and sorry for my poor description again. ^^


How do you use timer?


Nothing special…

Something like this,

this->schedule(schedule_selector(GameLayer::moveStonesDown), 0.5f);