ComputePath * ComputePath::createFromLayer( HelloWorld * layer ) { auto item = new ComputePath(); if ( item->initWithLayer(layer)) { item->autorelease(); return item; } return nullptr; }
Chicken * Chicken::createFromLayer( HelloWorld * layer ) { auto item = new Chicken(); if (item->initWithLayer(layer)) { item->autorelease(); return item; } return nullptr; }
ActionBar* ActionBar::creatWithLayer(cocos2d::Node* node) { auto pRet = new(std::nothrow) ActionBar(); if (pRet && pRet->initWithLayer(node)) { pRet->autorelease(); return pRet ; } else { CC_SAFE_DELETE(pRet) ; return NULL ; } }