CCCallFuncN* CCCallFuncN::actionWithScriptFuncName(const char *pszFuncName) {
	CCCallFuncN *pRet = new CCCallFuncN();

	if (pRet && pRet->initWithScriptFuncName(pszFuncName)) {
		pRet->autorelease();
		return pRet;
	}

	CC_SAFE_DELETE(pRet);
	return NULL;
}
예제 #2
0
	CCCallFuncN * CCCallFuncN::actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncN selector)
	{
		CCCallFuncN *pRet = new CCCallFuncN();
		if(pRet->initWithTarget(pSelectorTarget, selector))
		{
			pRet->autorelease();
			return pRet;
		}
		CC_SAFE_DELETE(pRet);
		return NULL;
	}
예제 #3
0
CCCallFuncN * CCCallFuncN::create(int nHandler)
{
	CCCallFuncN *pRet = new CCCallFuncN();
	if (pRet) {
		pRet->m_nScriptHandler = nHandler;
		pRet->autorelease();
	}
	else{
		CC_SAFE_DELETE(pRet);
	}
	return pRet;
}
CCCallFuncN * CCCallFuncN::create(CCObject* pSelectorTarget, SEL_CallFuncN selector)
{
    CCCallFuncN *pRet = new CCCallFuncN();

    if (pRet && pRet->initWithTarget(pSelectorTarget, selector))
    {
        pRet->autorelease();
        return pRet;
    }

    CC_SAFE_DELETE(pRet);
    return NULL;
}