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;
|
||||
}
|
||||
|
||||
CCCallFunc::~CCCallFunc(void)
|
||||
{
|
||||
if (m_nScriptHandler)
|
||||
{
|
||||
cocos2d::CCScriptEngineManager::sharedManager()->getScriptEngine()->removeScriptHandler(m_nScriptHandler);
|
||||
}
|
||||
CC_SAFE_RELEASE(m_pSelectorTarget);
|
||||
}
|
||||
|
||||
CCObject * CCCallFunc::copyWithZone(CCZone *pZone) {
|
||||
CCZone* pNewZone = NULL;
|
||||
CCCallFunc* pRet = NULL;
|
||||
|
|
|
@ -215,15 +215,12 @@ class CC_DLL CCCallFunc : public CCActionInstant //<NSCopying>
|
|||
public:
|
||||
CCCallFunc()
|
||||
: m_pSelectorTarget(NULL)
|
||||
, m_nScriptHandler(0)
|
||||
, m_pCallFunc(NULL)
|
||||
, m_nScriptHandler(0)
|
||||
{
|
||||
}
|
||||
virtual ~CCCallFunc()
|
||||
{
|
||||
CC_SAFE_RELEASE(m_pSelectorTarget);
|
||||
}
|
||||
/** creates the action with the callback
|
||||
virtual ~CCCallFunc();
|
||||
/** creates the action with the callback
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
typedef void (CCObject::*SEL_CallFunc)();
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue