After replacing Scene, the Schedule method doesn't work anymore

Hi!
I’m making a game in cocos2dx , so I’ve made a class named CoCoGui and I’ve also made an IntroPage class that inherits from CCLayerColor for the intro page of the game and a StartPage class that’s been inherited from CCLayerColor, too. I want to show the intro page for the first 2 seconds and then show the StartingPage but in the updateGame function of CoCoGui (which is the main loop of the game), when the replaceScene method called, and the Scene become replaced, the updateGame method won’t be called anymore! Please help me with this problem and how can i manage my game game with update method? thaks?

Here’s the init method of CoCoGui class:

bool CoCoGui::init ( ){
if ( !CCLayerColor::initWithColor ( ccc4 (100,100,100,255) ) ){
return false;
}
this->schedule ( schedule_selector ( CoCoGui::updateGame ));
return true;
}


cocogui.h.zip (0.5 KB)

If you replace a scene with another scene, the previous scene is destroyed, thus, stopping all update functions.
Also, the CCDirector (which is the class responsible for everything happening) will only update the current scene that is running.

Try using pushScene* andpopScene()* if that helps.