比如我在creator里面有一个类A,A中有function B
我在oc中应该怎么调用B?
se::ScriptEngine::getInstance()->evalString(),括号里面应该怎么填写??
1赞
JS怎么写,这边就怎么调,例如se::ScriptEngine::getInstance()->evalString(“window.showLoading()”)
在js中方法定义前面要加window吗?
TypeError: window.showVideoAsync is not a function
std::string paramstr = "cc.director.emit('EventOK')"; cocos2d::Application::getInstance()->getScheduler()->performFunctionInCocosThread([ paramstr ](){ se::ScriptEngine::getInstance()->evalString(paramstr.c_str()); });