当前位置:网站首页>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;
}
边栏推荐
- [Cloud Native] What should I do if SQL (and stored procedures) run too slowly?
- 常见JVM面试题及答案整理
- Yuan prospect and four track of the universe
- Access数据库的查询
- What is GameFi?
- (Crypto essential dry goods) Detailed analysis of the current NFT trading markets
- [JVM Loading]---Class Loading Mechanism
- C语言 | 获取字符串里逗号间隔的内容
- What is the difference between NFT and digital collection?
- 对于输出点是时间戳的渗透测试方法(以Oracle数据库为例)
猜你喜欢

The MySQL database in Alibaba Cloud was attacked, and the data was finally recovered
![[Ubuntu20.04 installs MySQL and MySQL-workbench visualization tool]](/img/3d/1b65fb33bfbf22da8243df1ab33ed5.png)
[Ubuntu20.04 installs MySQL and MySQL-workbench visualization tool]

为什么redis是单线程还那么快?

05 【绑定样式 条件渲染 列表渲染】

Linux modify MySQL database password

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

The server time zone value ‘й‘ is unrecognized or represents more than one time zone

Build DVWA with phpstudy

leetcode-每日一题1217. 玩筹码(贪心+位运算)

Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'
随机推荐
【Elastic-Job源码分析】——作业监听器
10 【高度塌陷与BFC】
Year-end summary - the years are quiet~
著名网站msdn.itellyou.cn原理分析
MySQL分页查询的5种方法
mysql password modification method in Linux (pro-test available)
Judgment of database in SQL injection
[Cloud Native] What should I do if SQL (and stored procedures) run too slowly?
UiBot存在已打开的MicrosoftEdge浏览器,无法执行安装
利用phpstudy搭建DVWA
年终总结——岁月静好~
MySQL压缩包方式安装,傻瓜式教学
sqlmap injection tutorial common commands
Yuan prospect and four track of the universe
For penetration testing methods where the output point is a timestamp (take Oracle database as an example)
Redis:安装使用
了解SSRF,这一篇就足够了
场效应管 | N-mos内部结构详解
[Cloud native] Ribbon is no longer used at the bottom layer of OpenFeign starting from the 2020.0.X version
为什么redis是单线程还那么快?