上一页 1 2 3 4 5 6 7 ··· 10 下一页

2014年6月17日

lua debug

摘要: lua 如何调试,可以使用ide - decode,zerobrane但是如果是远程调试就不方便了,所以开始使用console来debug了1.打断点> debug.debug()2.断点继续> cont3.打印callstack> print(debug.traceback()) 阅读全文

posted @ 2014-06-17 19:08 影语者 阅读(919) 评论(1) 推荐(0) 编辑

2014年5月27日

[ISSUE]Call to function 'print_children' that is neither visible in the template definition nor found by argument-dependent lookup

摘要: http://clang.llvm.org/compatibility.html#dep_lookup在使用rapidxml进行保存时rapidxml::xml_document doc;std::ofstream out(filepath);out >> doc;提示错误:Call to func... 阅读全文

posted @ 2014-05-27 10:29 影语者 阅读(1020) 评论(0) 推荐(0) 编辑

2014年5月18日

[ISSUE]attempt to call method 'trainPlayer' (a table value)

摘要: function TrainApi:trainPlayer() 确定这个函数是存在的,如果调用TrainApi其他函数也是正确的只能打一个debug.debug(), 查看一下原来是在function TrainApi:ctor() self.trainPlayer = nilend囧囧最近才从C... 阅读全文

posted @ 2014-05-18 18:33 影语者 阅读(633) 评论(0) 推荐(0) 编辑

2014年5月6日

[ISSUE]lua function

摘要: 刚开始使用lua,还有点不熟悉 class 是网上常见的实现 Test = class("Test") function Test:ctor() self.vark = 0 end function Test:isTest() self.vark = 0 end 如果调用self.isTest() 阅读全文

posted @ 2014-05-06 07:05 影语者 阅读(227) 评论(0) 推荐(0) 编辑

2014年5月3日

[ISSUE]invalid 'cobj' in function 'lua_cocos2dx_EventDispatcher_dispatchCustomEvent'

摘要: 环境: cocos2d-x + lua 3.0beta2首先声明全局变量UIEventDispatcher = cc.EventDispatcher:new()然后在使用的地方dispathCustomEventUIEventDispatcher:dispatchCustomEvent("test"... 阅读全文

posted @ 2014-05-03 09:11 影语者 阅读(7595) 评论(0) 推荐(0) 编辑

2014年5月2日

[ISSUE]Lambda binding for lua is not supported.

摘要: 环境: cocos2d-x + lua 3.0beta2想使用CCNotification, 发现3.0已经替换为CCEvent, 晃了一眼设计,不错原来在C++ 上自己也实现了一套Event,因为不满意CCNotification 没有优先级,没有自定义分类(比如UI,Logic),不能携带数据,... 阅读全文

posted @ 2014-05-02 22:33 影语者 阅读(2688) 评论(0) 推荐(0) 编辑

2014年5月1日

[ISSUE]attempt to call method 'addChild' (a nil value)

摘要: cocos2d-x + lua 3.0 beta2, cocosbuilder 3.0xxx 是在cocosbuider 里面某个node的name, 属性选择的Doc root var当MenuTest["xxx"]:addChild() 出现如题错误查看type(MenuTest["xxx"])... 阅读全文

posted @ 2014-05-01 22:00 影语者 阅读(2297) 评论(0) 推荐(0) 编辑

2014年4月30日

cocos2d: Cast name Layer doesn't include modular name which it belongs to,please add the modular name

摘要: cocos2d-x 3.0beta使用cocos2d-x + lua 中local layer = tolua.cast(node, "Layer") 出现以上的,虽然还是可以正常运行,但是还是想找到问题出在哪里搜索标题的关键字找不到,看来是lua中抛出的,那只能搜索tolua相关的函数,找到是 t... 阅读全文

posted @ 2014-04-30 15:02 影语者 阅读(584) 评论(0) 推荐(0) 编辑

关于cocos2dx+lua使用cocosbuilder乱弹

摘要: cocos2d-x 3.0 + cocosbuilder 3.0使用中发现每个按钮回调都要写一行对应的回调如:1 local function onMenuItemAClicked()2 ...3 end4 5 TestMenusLayer["onMenuItemAClicked"] = o... 阅读全文

posted @ 2014-04-30 07:48 影语者 阅读(1070) 评论(0) 推荐(0) 编辑

2014年4月14日

quick-cocos2d-x 杂记

摘要: 记录使用quick-cocos2d-x中的问题Q: 派生自Layer的onEnter() 怎么没有进入后来,发现是要在:ctor() 中加入 self:setNodeEventEnabled(true)A: 在 CCNodeExtend.lua 中查看 setNodeEventEnabled 的源... 阅读全文

posted @ 2014-04-14 12:18 影语者 阅读(546) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 10 下一页

导航