Created
December 27, 2013 08:12
-
-
Save gin0606/8144027 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CCNodeLoaderLibrary* nodeLoaderLibrary = CCNodeLoaderLibrary::newDefaultCCNodeLoaderLibrary(); | |
nodeLoaderLibrary->registerCCNodeLoader("TestScene", TestSceneLoader::loader()); | |
CCBReader* ccbReader = new CCBReader(nodeLoaderLibrary); | |
// ここで画像を保存したパスを指定する | |
ccbReader->setCCBRootPath(CCFileUtils::sharedFileUtils()->getWritablePath().c_str()); | |
CCNode* node = ccbReader->readNodeGraphFromFile("TestScene.ccbi"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ccbReader->setCCBRootPathはCCBReaderのインスタンスごとに設定しているので、アプリ内のリソースを使いたいときは
setCCBRootPath
を呼ばずに、通常通りreadNodeGraphFromFile
すれば出来るはずです(そこまで検証してないから自信ないけど、たぶん出来るはず