当前位置:网站首页>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;
}
边栏推荐
猜你喜欢
初识正则表达式
leetcode-每日一题745. 前缀和后缀搜索(哈希和字典树)
gin框架学习-JWT认证
The latest MySql installation teaching, very detailed
最新MySql安装教学,非常详细
【云原生】微服务Nacos的简单介绍与使用
计网 Packet Tracer仿真 | 简单易懂集线器和交换机对比(理论+仿真)
对于输出点是时间戳的渗透测试方法(以Oracle数据库为例)
npm WARN config global `--global`, `--local` are deprecated. Use `--location解决方案
mysql password modification method in Linux (pro-test available)
随机推荐
DeFi Token in the project management
Year-end summary - the years are quiet~
动态规划(一)| 斐波那契数列和归递
vulhub靶场学习日记hackme1
For penetration testing methods where the output point is a timestamp (take Oracle database as an example)
gin框架学习-GORM框架进阶之CRUD接口(数据库增删改查操作)
Digital twins will be an important way to enter the "metaverse"
js中的this指向与原型对象
利用phpstudy搭建DVWA
leetcode-2321. 拼接数组的最大分数(差分+枚举)
gin框架学习-Gin框架和Gorm框架搭建一个简单的API微服务
Three-party login using wallet Metamask based on web3.0
MySQL面试题大全(陆续更新)
[swagger close] The production environment closes the swagger method
js中的break与continue退出
Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'
对js的数组的理解
File operations in C language (1)
[Cloud native] Ribbon is no longer used at the bottom layer of OpenFeign starting from the 2020.0.X version
Detailed explanation of pointers in C language