mirror of https://github.com/axmolengine/axmol.git
fix #263
This commit is contained in:
parent
3cd3db93a0
commit
acc064770c
|
@ -121,7 +121,9 @@ void Control::sendActionsForControlEvents(EventType controlEvents)
|
||||||
#if CC_ENABLE_SCRIPT_BINDING
|
#if CC_ENABLE_SCRIPT_BINDING
|
||||||
cocos2d::BasicScriptData data(this,(void*)&controlEvents);
|
cocos2d::BasicScriptData data(this,(void*)&controlEvents);
|
||||||
cocos2d::ScriptEvent event(cocos2d::kControlEvent,(void*)&data);
|
cocos2d::ScriptEvent event(cocos2d::kControlEvent,(void*)&data);
|
||||||
cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(event);
|
auto scriptEngine = cocos2d::ScriptEngineManager::getInstance()->getScriptEngine();
|
||||||
|
if(scriptEngine)
|
||||||
|
scriptEngine->sendEvent(event);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue