当前位置:网站首页>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;
}
边栏推荐
- gin框架学习-Casbin进阶之策略管理API使用方法
- Volatility取证工具使用日记
- Linux中mysql密码修改方法(亲测可用)
- How to distinguish big and small endian in C language
- 碎片化NFT(Fractional NFT)
- 什么是EVM兼容链?
- 在kali上搭建vulhub漏洞靶场
- 通信原理——纠错编码 | 汉明码(海明码)手算详解
- First acquaintance with Flask
- Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘
猜你喜欢

小米手机短信定位服务激活失败

【云原生】SQL(及存储过程)跑得太慢怎么办?

【uiautomation】微信好友列表获取(存储到txt中)

永恒之蓝漏洞复现

Linux modify MySQL database password

什么是EVM兼容链?

GUCCI, LV and other luxury giant universe how to layout yuan, other brands should keep up with?

leetcode-每日一题1252. 奇数值单元格的数目(模拟优化)

mysql password modification method in Linux (pro-test available)

DeFi Token in the project management
随机推荐
2021美赛C题M奖思路
[Cloud native] Simple introduction and use of microservice Nacos
[windows]--- SQL Server 2008 super detailed installation tutorial
The MySQL database in Alibaba Cloud was attacked, and the data was finally recovered
leetcode-每日一题565. 数组嵌套(标记图和并查集)
What is the difference between NFT and digital collection?
vulhub靶场学习日记SickOs1.2
DeFi 项目中的治理Token
Regular Expression Basics
10 【高度塌陷与BFC】
Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘
MySQL高级学习笔记
Artifact SSMwar exploded Error deploying artifact.See server log for details
js中的break与continue退出
数据库 | SQL增删改查基础语法
"limit" query in Oracle database
Xiaobai learns reptiles - introduction to reptiles
【windows】--- SQL Server 2008 超详细安装教程
Build DVWA with phpstudy
sqlmap注入教程 常用指令