Esempio n. 1
0
CCScrollLayer* CCScrollLayer::layerWithLayers(CCArray *layers, int widthOffset)
{	
	CCScrollLayer *pRet = new CCScrollLayer();
	if (pRet && pRet->initWithLayers(layers, widthOffset))
	{
		pRet->autorelease();
		return pRet;
	}
	CC_SAFE_DELETE(pRet);
	return NULL;
}
Esempio n. 2
0
CCScrollLayer* CCScrollLayer::layerWithLayers(CCArray * layers, float layerWidth, int space)
{	
	CCScrollLayer * pRet = new CCScrollLayer();
	if (pRet && pRet->initWithLayers(layers, layerWidth, space))
	{
		pRet->autorelease();
		return pRet;
	}
	CC_SAFE_DELETE(pRet);
	return NULL;
}
CCScrollLayer* CCScrollLayer::create ( CCArray* pLayers, KDfloat fWidth, KDint nWidthOffset )
{
	CCScrollLayer*	pRet = new CCScrollLayer ( );

	if ( pRet && pRet->initWithLayers ( pLayers, fWidth, nWidthOffset ) )
	{
		pRet->autorelease ( );
	}
	else
	{
		CC_SAFE_DELETE ( pRet );
	}

	return pRet;
}