当前位置:网站首页>quick-3.5 ActionTimeline的setLastFrameCallFunc调用会崩溃问题
quick-3.5 ActionTimeline的setLastFrameCallFunc调用会崩溃问题
2022-07-31 05:15:00 【xuyid】
#include "cocos2d.h"
#include "CCLuaEngine.h"
#include "CCLuaValue.h"
#include <vector>
从quick-3.5/cocos/scripting/lua-bindings/auto找到lua_cocos2dx_studio_auto.cpp,在20984行修改
int lua_cocos2dx_studio_ActionTimeline_setLastFrameCallFunc(lua_State* tolua_S)函数为
:
int lua_cocos2dx_studio_ActionTimeline_setLastFrameCallFunc(lua_State* tolua_S)
{
if (nullptr == tolua_S)
return 0;
int argc = 0;
cocostudio::timeline::ActionTimeline* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(tolua_S,1,"ccs.ActionTimeline",0,&tolua_err)) goto tolua_lerror;
#endif
self = static_cast<cocostudio::timeline::ActionTimeline*>(tolua_tousertype(tolua_S,1,0));
#if COCOS2D_DEBUG >= 1
if (nullptr == self) {
tolua_error(tolua_S,"invalid 'self' in function 'lua_cocos2dx_ActionTimeline_setLastFrameCallFunc'\n", NULL);
return 0;
}
#endif
argc = lua_gettop(tolua_S) - 1;
if (1 == argc)
{
#if COCOS2D_DEBUG >= 1
if (!toluafix_isfunction(tolua_S,2,"LUA_FUNCTION",0,&tolua_err) )
{
goto tolua_lerror;
}
#endif
LUA_FUNCTION handler = ( toluafix_ref_function(tolua_S,2,0));
self->setLastFrameCallFunc([=](){
LuaEngine::getInstance()->getLuaStack()->executeFunctionByHandler(handler, 0);
});
return 0;
}
luaL_error(tolua_S, "'setLastFrameCallFunc' function of ActionTimeline has wrong number of arguments: %d, was expecting %d\n", argc, 1);
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'setLastFrameCallFunc'.",&tolua_err);
#endif
return 0;
}
边栏推荐
猜你喜欢
随机推荐
元宇宙的前景及四大赛道
对于输出点是时间戳的渗透测试方法(以Oracle数据库为例)
C语言 | 获取字符串里逗号间隔的内容
Judgment of database in SQL injection
mysql启动报错The server quit without updating PID file几种解决办法
Take you to understand the MySQL isolation level, what happens when two transactions operate on the same row of data at the same time?
gin框架学习-JWT认证
Volatility取证工具使用日记
MySql创建数据表
【uiautomation】微信好友列表获取(存储到txt中)
Getting to know regular expressions
UiBot存在已打开的MicrosoftEdge浏览器,无法执行安装
vulhub靶场学习日记SickOs1.2
2021美赛C题M奖思路
年终总结——岁月静好~
vulhub靶场学习日记xxe-lab
Artifact SSMwar exploded Error deploying artifact.See server log for details
leetcode-每日一题1252. 奇数值单元格的数目(模拟优化)
How MySQL - depots table?A look at will understand
使用ps | egrep时过滤排除掉egrep自身