随笔分类 -  cocos2D

摘要:根据item本身x加上间隔来调整位置。 阅读全文
posted @ 2017-06-26 15:37 游戏开发学习er 阅读(292) 评论(0) 推荐(0)
摘要:page加入时,其panel必须与page页面对齐,这样加到pageview时才能对齐,目前的cocos没有相关的page位置调整的方法 阅读全文
posted @ 2017-04-19 16:30 游戏开发学习er 阅读(284) 评论(0) 推荐(0)
摘要:1.local richTable = { {text = ' ', color = cc.c3b(173,118,15)}, {custom = '', color = ItemMacro[index].color, param = id} } 2.item:setContentSize(50,2 阅读全文
posted @ 2017-04-18 12:00 游戏开发学习er 阅读(318) 评论(0) 推荐(0)
摘要:a为number类型,b,c为string类型 if (c>a+b) {} 判断错误。 原因:a+b时,自动把右边转换为number类型,而‘>’没有自动类型转换,'+'才有。 因此,把整个表达式移到左边来 if(c-(a+b)>0) {} 运行通过。 阅读全文
posted @ 2016-12-04 20:07 游戏开发学习er 阅读(580) 评论(0) 推荐(0)
摘要:local texture = cc.Director:getInstance():getTextureCache():addImage("ui/xxx.png") sprite:setTexture(texture) 阅读全文
posted @ 2016-12-03 22:24 游戏开发学习er 阅读(459) 评论(0) 推荐(0)
摘要:要点:找到UIFile在哪个Scene加载,即找 UIManager:loadUI(self,"People")此位置,则,UIPeople层需要farmSceneObj。 阅读全文
posted @ 2016-11-05 01:51 游戏开发学习er 阅读(331) 评论(0) 推荐(0)