NS_CC_BEGIN ActionTween* ActionTween::create(float duration, const std::string& key, float from, float to) { ActionTween* ret = new (std::nothrow) ActionTween(); if (ret && ret->initWithDuration(duration, key, from, to)) { ret->autorelease(); return ret; } delete ret; return nullptr; }
NS_CC_BEGIN ActionTween* ActionTween::create(float duration, const std::string& key, float from, float to) { ActionTween* ret = new (std::nothrow) ActionTween(); if (ret && ret->initWithDuration(duration, key, from, to)) { ret->autorelease(); } else { CC_SAFE_DELETE(ret); } return ret; }
NS_CC_BEGIN ActionTween* ActionTween::create(float aDuration, const char* key, float from, float to) { ActionTween* pRet = new ActionTween(); if (pRet && pRet->initWithDuration(aDuration, key, from, to)) { pRet->autorelease(); } else { CC_SAFE_DELETE(pRet); } return pRet; }