Example #1
0
ComputePath * ComputePath::createFromLayer( HelloWorld * layer )
{
	 auto item = new ComputePath();
	 if ( item->initWithLayer(layer))
	 {
		 item->autorelease();
		 return item;
	 }
	 return nullptr;
}
Example #2
0
Chicken * Chicken::createFromLayer( HelloWorld * layer )
{
	auto item = new Chicken();
	if (item->initWithLayer(layer))
	{
		item->autorelease();
		return item;
	}
	return nullptr;

}
Example #3
0
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 ;
	}

}