当前位置:网站首页>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;
}
边栏推荐
- js中的函数
- leetcode-每日一题873. 最长的斐波那契子序列的长度(哈希和二分)
- npm WARN config global `--global`, `--local` are deprecated. Use `--location解决方案
- leetcode-每日一题731. 我的日程安排表 II
- What is an EVM Compatible Chain?
- MySQL面试题大全(陆续更新)
- NFT:数字所有权的核心
- C语言 | 获取字符串里逗号间隔的内容
- Why is the redis single-threaded also so fast?
- On the side of Ali, tell me what are the application scenarios of message middleware you know?
猜你喜欢
最新MySql安装教学,非常详细
Yuan prospect and four track of the universe
对js的数组的理解
gin框架学习-JWT认证
For penetration testing methods where the output point is a timestamp (take Oracle database as an example)
[JVM Loading]---Class Loading Mechanism
Access database query
[uiautomation] Get WeChat friend list (stored in txt)
带你搞懂MySQL隔离级别,两个事务同时操作同一行数据会怎样?
年终总结——岁月静好~
随机推荐
(Crypto必备干货)详细分析目前NFT的几大交易市场
gin框架学习-Gin框架和Gorm框架搭建一个简单的API微服务
代码块、Package,Import,封装(第六天)
js中的函数
sqlmap injection tutorial common commands
数字孪生将成为进入“元宇宙”一项重要的途径
工件SSMwar exploded 部署工件时出错。请参阅服务器日志了解详细信息
了解SSRF,这一篇就足够了
PHP中abstract(抽象)、final(最终)和static(静态)原理与用法
Artifact SSMwar exploded Error deploying artifact.See server log for details
一文速学-玩转MySQL获取时间、格式转换各类操作方法详解
理解js运算符
[Cloud Native] What should I do if SQL (and stored procedures) run too slowly?
On the side of Ali, tell me what are the application scenarios of message middleware you know?
About integrating superset into your own project
使用ps | egrep时过滤排除掉egrep自身
MySQL compressed package installation, fool teaching
常见JVM面试题及答案整理
小白学爬虫——爬虫入门
对js的数组的理解