CCB-X-Reader
CCB-X-Reader copied to clipboard
CCBClassGenerator.cpp creates NULL layer fix
Change createCustomCCLayerClassWithName to this, any you can have a normal CCLayer in your cbb files
cocos2d::CCLayer * CCBClassGenerator::createCustomCCLayerClassWithName (const char * classNameCString) {
//When you have a "HelloWorld" custom CCLayer in your cbb file
/*
if (strcmp(classNameCString, "HelloWorld") == 0) {
return dynamic_cast<CCLayer *>(new HelloWorld);
}
*/
//no custom layer so return a new CCLayer
return new CCLayer;
}