当前位置:网站首页>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;
}
边栏推荐
- The feign call fails, JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r
- GUCCI、LV等奢侈品巨头如何布局元宇宙的,其他品牌应该跟上吗?
- Using IIS10 to build an asp website in win11
- this指向问题
- 【云原生】微服务Nacos的简单介绍与使用
- 理解js运算符
- About integrating superset into your own project
- 带你搞懂MySQL隔离级别,两个事务同时操作同一行数据会怎样?
- Understanding SSRF, this article is enough
- 最新MySql安装教学,非常详细
猜你喜欢

On the side of Ali, tell me what are the application scenarios of message middleware you know?
Getting to know regular expressions

What is GameFi?

Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'

MySQL高级学习笔记

(Crypto必备干货)详细分析目前NFT的几大交易市场

对js的数组的理解

Linux modify MySQL database password

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

leetcode-1833. 雪糕的最大数量(排序+贪心)
随机推荐
gin框架学习-Gin框架和Gorm框架搭建一个简单的API微服务
js中的break与continue退出
UiBot存在已打开的MicrosoftEdge浏览器,无法执行安装
C语言 | 获取字符串里逗号间隔的内容
阿里一面,说说你知道消息中间件的应用场景有哪些?
MySQL分页查询的5种方法
一文速学-玩转MySQL获取时间、格式转换各类操作方法详解
带你搞懂MySQL隔离级别,两个事务同时操作同一行数据会怎样?
SQL注入中数据库的判断
File operations in C language (1)
leetcode-每日一题1217. 玩筹码(贪心+位运算)
C language tutorial (1) - preparation
leetcode-每日一题873. 最长的斐波那契子序列的长度(哈希和二分)
MySql创建数据表
gin框架学习-Casbin进阶之策略管理API使用方法
MySQL高级语句(一)
leetcode-438. 找到字符串中所有字母异位词(滑动窗口)
对于输出点是时间戳的渗透测试方法(以Oracle数据库为例)
gin框架学习-GORM框架进阶之CRUD接口(数据库增删改查操作)
MySQL压缩包方式安装,傻瓜式教学