예제 #1
0
	//
	// CallFuncND
	//
	CCCallFuncND * CCCallFuncND::actionWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncND selector, void* d)
	{
		CCCallFuncND* pRet = new CCCallFuncND();
		if (pRet->initWithTarget(pSelectorTarget, selector, d))
		{
			pRet->autorelease();
			return pRet;
		}
		CC_SAFE_DELETE(pRet);
		return NULL;
	}
CCCallFuncND * CCCallFuncND::create(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d)
{
    CCCallFuncND* pRet = new CCCallFuncND();

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

    CC_SAFE_DELETE(pRet);
    return NULL;
}
예제 #3
0
	CCCallFuncND* CCCallFuncND::actionWithScriptFuncName(const char* pszFuncName, void *d)
	{
		CCCallFuncND* pRet = new CCCallFuncND();
		if (pRet->initWithScriptFuncName(pszFuncName))
		{
			pRet->autorelease();
			pRet->m_pData = d;
			return pRet;
		}
		CC_SAFE_DELETE(pRet);
		return NULL;
	}
CCCallFuncND* CCCallFuncND::create ( CCObject* pSelectorTarget, SEL_CallFuncND pSelector, KDvoid* pData )
{
	CCCallFuncND*  pRet = new CCCallFuncND ( );
	
	if ( pRet && pRet->initWithTarget ( pSelectorTarget, pSelector, pData ) )
	{
		pRet->autorelease ( );	
	}
	else
	{
		CC_SAFE_DELETE ( pRet );
	}
	
	return pRet;
}