Ejemplo n.º 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;
}
Ejemplo n.º 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;
	}
Ejemplo n.º 4
0
CCCallFunc * CCCallFunc::create(int nHandler)
{
	CCCallFunc *pRet = new CCCallFunc();

	if (pRet) {
		pRet->m_nScriptHandler = nHandler;
		pRet->autorelease();
	}
	else{
		CC_SAFE_DELETE(pRet);
	}
	return pRet;
}
Ejemplo n.º 5
0
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;
}