cocos2dx ActionTimeline setLastFrameCallFunc
来源:互联网 发布:手机屏幕录视频软件 编辑:程序博客网 时间:2024/06/06 04:37
lua_cocos2dx_ui_manualstatic 中写入
static int lua_cocos2dx_ActionTimeline_setLastFrameCallFunc(lua_State* L){if (nullptr == L)return 0;int argc = 0;cocostudio::timeline::ActionTimeline* self = nullptr;#if COCOS2D_DEBUG >= 1 tolua_Error tolua_err;if (!tolua_isusertype(L, 1, "ccs.ActionTimeline", 0, &tolua_err)) goto tolua_lerror;#endif self = static_cast<cocostudio::timeline::ActionTimeline*>(tolua_tousertype(L, 1, 0));#if COCOS2D_DEBUG >= 1 if (nullptr == self) {tolua_error(L, "invalid 'self' in function 'lua_cocos2dx_ActionTimeline_setLastFrameCallFunc'\n", NULL);return 0;}#endif argc = lua_gettop(L) - 1;if (1 == argc){#if COCOS2D_DEBUG >= 1 if (!toluafix_isfunction(L, 2, "LUA_FUNCTION", 0, &tolua_err)){goto tolua_lerror;}#endif LUA_FUNCTION handler = (toluafix_ref_function(L, 2, 0));self->setLastFrameCallFunc([=](){LuaEngine::getInstance()->getLuaStack()->executeFunctionByHandler(handler, 0);});return 0;}luaL_error(L, "'setLastFrameCallFunc' function of ActionTimeline has wrong number of arguments: %d, was expecting %d\n", argc, 1);#if COCOS2D_DEBUG >= 1 tolua_lerror:tolua_error(L, "#ferror in function 'setLastFrameCallFunc'.", &tolua_err);#endif return 0;}static void extendActionTimeline(lua_State* L){lua_pushstring(L, "ccs.ActionTimeline");lua_rawget(L, LUA_REGISTRYINDEX);if (lua_istable(L, -1)){//tolua_function(L, "setFrameEventCallFunc", lua_cocos2dx_ActionTimeline_setFrameEventCallFunc);tolua_function(L, "setLastFrameCallFunc", lua_cocos2dx_ActionTimeline_setLastFrameCallFunc);}lua_pop(L, 1);}
然后在 cocos2dx_studio.ini sikp中添加 ActionTimeline::[setFrameEventCallFunc setLastFrameCallFunc],
最后在lua_cocos2dx_ui_manualstatic 中的 register_all_cocos2dx_ui_manual函数中添加extendActionTimeline(L);
0 0
- cocos2dx ActionTimeline setLastFrameCallFunc
- cocos2dx 3.x中ActionTimeLine无法使用setLastFrameCallFunc的解决方案
- quick-3.5 ActionTimeline的setLastFrameCallFunc调用会崩溃问题
- cocos2dx Lua 版本中无法调用setLastFrameCallFunc
- setLastFrameCallFunc接口不能使用解决方案
- cocos2d-js actiontimeline的eventFrame错误自动调用
- cocos2dx
- cocos2dx
- cocos2dx
- cocos2dx
- cocos2dx
- cocos2dx
- Cocos2dx
- cocos2dx
- cocos2dx
- cocos2dx
- cocos2dx
- cocos2dx
- genymotion5.1启动一直卡在启动界面或者是一直卡在启动优化界面问题处理
- Highcharts使用CSV格式数据绘制图表
- iOS应用在App Store 中审核的过程中不同状态所表示的意义
- linux之绪论理解[读书笔记]
- Unity笔记 2D ROGUELIKE 实例详解
- cocos2dx ActionTimeline setLastFrameCallFunc
- 社説 20150721 主権者教育 政治的中立をどう確保するか
- Java-发送邮件(附件、图片)---(四)类-MimeMultipart、MimeBodyPart、FileDataSource、DataHandler、
- OpenVSwitch 配置QOS
- pthread_cond_wait/pthread_cond_timedwait使用注意
- 对项目的了解几乎为零?如何快速上手一个新项目
- Histogram of Oriented Gridients(HOG) 方向梯度直方图
- 557C Arthur and Table
- MarkDown简明语法总结