예제 #1
0
void MainMenuScene::pressedPlay(CCNode* sender)
{
  // Load the game scene
  map<string, CCNodeLoader*> loader_map;
  loader_map.insert(make_pair("GameScene", GameSceneLoader::loader()));
  CCScene* gameScene = (CCScene*)loadCCBFile("res/GameScene.ccbi", loader_map);
  // Go to the game scene
  if (gameScene) {
    // Then add the scene to the stack. The director will run it when it automatically when the view is displayed.
    CCDirector::sharedDirector()->replaceScene(gameScene);
  }
}
예제 #2
0
void MapMenu1Layer::gameCB( CCObject* pObject )
{
    CCNode *node = (CCNode*)pObject;
    int tag = node->getTag();
    switch (tag) {
        case 1:
            loadCCBFile(1);
            break;
        case 2:
            CCLOG("no yet finished!!");
            break;
        default:
            break;
    }
 

}