mirror of https://github.com/axmolengine/axmol.git
Merge pull request #1690 from dualface/fix_CCCallFunc_script_support
Fix cc call func script support
This commit is contained in:
commit
af530878fd
|
@ -406,6 +406,15 @@ bool CCCallFunc::initWithTarget(CCObject* pSelectorTarget) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CCCallFunc::~CCCallFunc(void)
|
||||||
|
{
|
||||||
|
if (m_nScriptHandler)
|
||||||
|
{
|
||||||
|
cocos2d::CCScriptEngineManager::sharedManager()->getScriptEngine()->removeScriptHandler(m_nScriptHandler);
|
||||||
|
}
|
||||||
|
CC_SAFE_RELEASE(m_pSelectorTarget);
|
||||||
|
}
|
||||||
|
|
||||||
CCObject * CCCallFunc::copyWithZone(CCZone *pZone) {
|
CCObject * CCCallFunc::copyWithZone(CCZone *pZone) {
|
||||||
CCZone* pNewZone = NULL;
|
CCZone* pNewZone = NULL;
|
||||||
CCCallFunc* pRet = NULL;
|
CCCallFunc* pRet = NULL;
|
||||||
|
|
|
@ -215,14 +215,11 @@ class CC_DLL CCCallFunc : public CCActionInstant //<NSCopying>
|
||||||
public:
|
public:
|
||||||
CCCallFunc()
|
CCCallFunc()
|
||||||
: m_pSelectorTarget(NULL)
|
: m_pSelectorTarget(NULL)
|
||||||
, m_nScriptHandler(0)
|
|
||||||
, m_pCallFunc(NULL)
|
, m_pCallFunc(NULL)
|
||||||
|
, m_nScriptHandler(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual ~CCCallFunc()
|
virtual ~CCCallFunc();
|
||||||
{
|
|
||||||
CC_SAFE_RELEASE(m_pSelectorTarget);
|
|
||||||
}
|
|
||||||
/** creates the action with the callback
|
/** creates the action with the callback
|
||||||
@deprecated: This interface will be deprecated sooner or later.
|
@deprecated: This interface will be deprecated sooner or later.
|
||||||
typedef void (CCObject::*SEL_CallFunc)();
|
typedef void (CCObject::*SEL_CallFunc)();
|
||||||
|
|
Loading…
Reference in New Issue