Пример #1
0
	CCCallFunc * CCCallFunc::actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFunc selector)
	{
		CCCallFunc* pCallFunc = new CCCallFunc();
		pCallFunc->autorelease();

		pCallFunc->initWithTarget(pSelectorTarget);
		pCallFunc->m_pCallFunc = selector;

		return pCallFunc;
	}
CCCallFunc* CCCallFunc::actionWithScriptFuncName(const char* pszFuncName) {
	CCCallFunc *pRet = new CCCallFunc();

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

	CC_SAFE_DELETE(pRet);
	return NULL;
}
Пример #3
0
	CCCallFunc * CCCallFunc::actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFunc selector)
	{
		CCCallFunc *pRet = new CCCallFunc();
		if(pRet->initWithTarget(pSelectorTarget))
		{
			pRet->m_pCallFunc = selector;
			pRet->autorelease();
			return pRet;
		}
		CC_SAFE_DELETE(pRet);
		return NULL;
	}
CCCallFunc * CCCallFunc::create(int nHandler)
{
	CCCallFunc *pRet = new CCCallFunc();

	if (pRet) {
		pRet->m_nScriptHandler = nHandler;
		pRet->autorelease();
	}
	else{
		CC_SAFE_DELETE(pRet);
	}
	return pRet;
}
CCCallFunc * CCCallFunc::create(CCObject* pSelectorTarget, SEL_CallFunc selector) 
{
    CCCallFunc *pRet = new CCCallFunc();

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

    CC_SAFE_DELETE(pRet);
    return NULL;
}