CCB-X-Reader icon indicating copy to clipboard operation
CCB-X-Reader copied to clipboard

CCBClassGenerator.cpp creates NULL layer fix

Open ghost opened this issue 12 years ago • 0 comments

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; 
}

ghost avatar Jul 12 '12 09:07 ghost