void CCMenuItem::unregisterScriptTapHandler(void) { if (m_nScriptTapHandler) { CCScriptEngineManager::sharedManager()->getScriptEngine()->removeScriptHandler(m_nScriptTapHandler); LUALOG("[LUA] Remove CCMenuItem script handler: %d", m_nScriptTapHandler); m_nScriptTapHandler = 0; } }
void MenuItem::unregisterScriptTapHandler(void) { if (_scriptTapHandler) { ScriptEngineManager::sharedManager()->getScriptEngine()->removeScriptHandler(_scriptTapHandler); LUALOG("[LUA] Remove MenuItem script handler: %d", _scriptTapHandler); _scriptTapHandler = 0; } }
ScriptHandlerEntry::~ScriptHandlerEntry() { if (_handler != 0 && ScriptEngineManager::ShareInstance) { ScriptEngineManager::ShareInstance->getScriptEngine()->removeScriptHandler(_handler); LUALOG("[LUA] Remove event handler: %d", _handler); } _handler = 0; }
CCTouchScriptHandlerEntry::~CCTouchScriptHandlerEntry ( KDvoid ) { if ( m_nHandler != 0 ) { CCScriptEngineManager::sharedManager ( )->getScriptEngine ( )->removeScriptHandler ( m_nHandler ); LUALOG ( "[LUA] Remove touch event handler: %d", m_nHandler ); m_nHandler = 0; } }
ScriptHandlerEntry::~ScriptHandlerEntry(void) { if (_handler != 0 ) { ScriptEngineManager::getInstance()->getScriptEngine()->removeScriptHandler(_handler); LUALOG("[LUA] Remove event handler: %d", _handler); _handler = 0; } }
KDbool CCSchedulerScriptHandlerEntry::init ( KDfloat fInterval, KDbool bPaused ) { m_pTimer = new CCTimer ( ); m_pTimer->initWithScriptHandler ( m_nHandler, fInterval ); m_pTimer->autorelease ( ); m_pTimer->retain ( ); m_bPaused = bPaused; LUALOG ( "[LUA] ADD script schedule: %d, entryID: %d", m_nHandler, m_nEntryId ); return KD_TRUE; }
bool SchedulerScriptHandlerEntry::init(float fInterval, bool bPaused) { _timer = new Timer(); _timer->initWithScriptHandler(_handler, fInterval); _timer->autorelease(); _timer->retain(); _paused = bPaused; LUALOG("[LUA] ADD script schedule: %d, entryID: %d", _handler, _entryId); return true; }
bool CCSchedulerScriptHandlerEntry::init(float fInterval, bool bPaused) { if (!CCScriptHandlerEntry::init()) return false; m_pTimer = new CCTimer(); m_pTimer->initWithScriptHandler(m_nHandler, fInterval); m_pTimer->autorelease(); m_pTimer->retain(); m_bPaused = bPaused; LUALOG("[LUA] ADD script schedule: %d, entryID: %d", m_nHandler, m_nEntryId); return true; }
void CCLayer::registerWithTouchDispatcher() { if (m_pScriptHandlerEntry) { if (m_pScriptHandlerEntry->getIsMultiTouches()) { CCTouchDispatcher::sharedDispatcher()->addStandardDelegate(this, 0); LUALOG("[LUA] Add multi-touches event handler: %d", m_pScriptHandlerEntry->getHandler()); } else { CCTouchDispatcher::sharedDispatcher()->addTargetedDelegate(this, m_pScriptHandlerEntry->getPriority(), m_pScriptHandlerEntry->getSwallowsTouches()); LUALOG("[LUA] Add touch event handler: %d", m_pScriptHandlerEntry->getHandler()); } return; } CCTouchDispatcher::sharedDispatcher()->addStandardDelegate(this,0); }
bool CCSchedulerScriptHandlerEntry::initWithHandler(int nHandler, ccTime fInterval, bool bPaused) { m_pTimer = new CCTimer(); m_pTimer->initWithScriptHandler(nHandler, fInterval); m_pTimer->autorelease(); m_pTimer->retain(); m_nHandler = nHandler; m_bPaused = bPaused; LUALOG("[LUA] ADD script schedule: %d, entryID: %d", m_nHandler, m_nEntryID); return true; }
CCTouchScriptHandlerEntry::~CCTouchScriptHandlerEntry(void) { CCScriptEngineManager::sharedManager()->getScriptEngine()->removeLuaHandler(m_nHandler); LUALOG("[LUA] Remove touch event handler: %d", m_nHandler); }
TouchScriptHandlerEntry::~TouchScriptHandlerEntry(void) { ScriptEngineManager::getInstance()->getScriptEngine()->removeScriptHandler(m_nHandler); LUALOG("[LUA] Remove touch event handler: %d", m_nHandler); }
CCSchedulerScriptHandlerEntry::~CCSchedulerScriptHandlerEntry() { LUALOG("[LUA] REMOVE scheduler script handler: %d", m_nHandler); }
TouchScriptHandlerEntry::~TouchScriptHandlerEntry(void) { ScriptEngineManager::sharedManager()->getScriptEngine()->removeScriptHandler(_handler); LUALOG("[LUA] Remove touch event handler: %d", _handler); }
void CCMenuItem::registerScriptTapHandler(int nHandler) { unregisterScriptTapHandler(); m_nScriptTapHandler = nHandler; LUALOG("[LUA] Add CCMenuItem script handler: %d", m_nScriptTapHandler); }
SchedulerScriptHandlerEntry::~SchedulerScriptHandlerEntry(void) { _timer->release(); LUALOG("[LUA] DEL script schedule %d, entryID: %d", _handler, _entryId); }
CCSchedulerScriptHandlerEntry::~CCSchedulerScriptHandlerEntry ( KDvoid ) { m_pTimer->release ( ); LUALOG ( "[LUA] DEL script schedule %d, entryID: %d", m_nHandler, m_nEntryId ); }
void ScutScene::registerOnEnter(int nFunc) { m_nEnter = nFunc; LUALOG("[LUA] Add ScutScene script OnEnter handler: %d", m_nEnter); }
CCSchedulerScriptHandlerEntry::~CCSchedulerScriptHandlerEntry(void) { m_pTimer->release(); CCScriptEngineManager::sharedManager()->getScriptEngine()->removeLuaHandler(m_nHandler); LUALOG("[LUA] DEL script schedule %d, entryID: %d", m_nHandler, m_nEntryID); }
void HStoreImplWin32::registerStoreScriptHandler(int INhandler) { unregisterStoreScriptHandler(); m_storeScriptHandler = INhandler; LUALOG("[LUA] Add HStore script handler: %d", m_storeScriptHandler); }
void ScutScene::registerOnExit(int nFunc) { m_nExit = nFunc; LUALOG("[LUA] Add ScutScene script OnExit handler: %d", m_nExit); }