当前位置:网站首页>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;
}
边栏推荐
- 场效应管 | N-mos内部结构详解
- [Ubuntu20.04 installs MySQL and MySQL-workbench visualization tool]
- MySQL高级语句(一)
- leetcode-1833. 雪糕的最大数量(排序+贪心)
- mysql password modification method in Linux (pro-test available)
- 数字孪生将成为进入“元宇宙”一项重要的途径
- NFT:数字所有权的核心
- 腾讯云GPU桌面服务器驱动安装
- Access数据库的查询
- Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'
猜你喜欢

MySql创建数据表

Linux修改MySQL数据库密码
![[Cloud native] Open source data analysis SPL easily copes with T+0](/img/89/4a96358956782ef9dacf0b700b54c3.png)
[Cloud native] Open source data analysis SPL easily copes with T+0
Getting to know regular expressions

Build DVWA with phpstudy

NFTs: The Heart of Digital Ownership

leetcode-每日一题565. 数组嵌套(标记图和并查集)

(Crypto essential dry goods) Detailed analysis of the current NFT trading markets

【ubuntu20.04安装MySQL以及MySQL-workbench可视化工具】

Install mysqldb in mac10.14
随机推荐
SQL注入中数据库的判断
【Elastic-Job源码分析】——作业监听器
什么是 GameFi?
C语言 | 获取字符串里逗号间隔的内容
永恒之蓝漏洞复现
leetcode-每日一题剑指 Offer II 041. 滑动窗口的平均值(队列模拟)
leetcode-每日一题558. 四叉树交集(分治递归)
【Elastic-Job】分布式调度任务概览篇
(Crypto essential dry goods) Detailed analysis of the current NFT trading markets
gin框架学习-Gin框架和Gorm框架搭建一个简单的API微服务
vulhub靶场学习日记SickOs1.2
What is the difference between NFT and digital collection?
this指向问题
年终总结——岁月静好~
腾讯云GPU桌面服务器驱动安装
Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'
vulhub靶场学习日记hackme1
Why is the redis single-threaded also so fast?
12 【网页布局总结 元素的显示与隐藏】
The MySQL database in Alibaba Cloud was attacked, and the data was finally recovered