Skip to content

Instantly share code, notes, and snippets.

@syuhari
Created February 4, 2013 08:08
Show Gist options
  • Save syuhari/4705552 to your computer and use it in GitHub Desktop.
Save syuhari/4705552 to your computer and use it in GitHub Desktop.
How to use CocosBuilder for cocos2dx
CCNodeLoaderLibrary * ccNodeLoaderLibrary = CCNodeLoaderLibrary::sharedCCNodeLoaderLibrary();
CCBReader * ccbReader = new CCBReader(ccNodeLoaderLibrary);
CCNode* node = ccbReader->readNodeGraphFromFile("CCTestLayer.ccbi");
CCScene * scene = CCScene::create();
if(node != NULL) {
scene->addChild(node);
}
ccbReader->release();
CCDirector::sharedDirector(->runWithScene(scene);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment