CCCallFuncO * CCCallFuncO::actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject) { CCCallFuncO *pRet = new CCCallFuncO(); if(pRet->initWithTarget(pSelectorTarget, selector, pObject)) { pRet->autorelease(); return pRet; } CC_SAFE_DELETE(pRet); return NULL; }
CCCallFuncO* CCCallFuncO::actionWithScriptFuncName(const char *pszFuncName) { CCCallFuncO *pRet = new CCCallFuncO(); if (pRet && pRet->initWithScriptFuncName(pszFuncName)) { pRet->autorelease(); return pRet; } CC_SAFE_DELETE(pRet); return NULL; }
CCCallFuncO* CCCallFuncO::create ( CCObject* pSelectorTarget, SEL_CallFuncO pSelector, CCObject* pObject ) { CCCallFuncO* pRet = new CCCallFuncO ( ); if ( pRet && pRet->initWithTarget ( pSelectorTarget, pSelector, pObject ) ) { pRet->autorelease ( ); } else { CC_SAFE_DELETE ( pRet ); } return pRet; }