Пример #1
0
FloatWord* FloatWord::create(const std::string& word,const int fontSize,Point begin){
	FloatWord* ret = new FloatWord();
	if(ret && ret->init(word,fontSize,begin)){
		ret->autorelease();
		return ret;
	}
	CC_SAFE_DELETE(ret);
	return nullptr;
}
Пример #2
0
FloatWord* FloatWord::create( const std::string& fonts,const int fontSize,Vec2 begin )
{
	FloatWord* pRet = new FloatWord();
	if (pRet && pRet->init(fonts,fontSize,begin))
	{
		pRet->autorelease();
		return pRet;
	}
	else
	{
		CC_SAFE_DELETE(pRet);
		return nullptr;
	}
}