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)