上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 38 下一页
摘要: //fileName是fnt文件的path。在fnt文件的相同目录下有同名png文件。使用ShoeBox.exe生成fnt文件。在fnt文件中修改路径为类似number 及 number.png的格式let textBMFont = new ccui.TextBMFont(text, filenam 阅读全文
posted @ 2019-12-11 17:23 流星曳尾 阅读(258) 评论(0) 推荐(0)
摘要: let dis;//item宽度加item之间gap的宽度item.setPosition((i<arr.length/2?-1:1) * Math.abs(i - arr.length/2 + 0.5) * dis,0); 阅读全文
posted @ 2019-12-10 17:13 流星曳尾 阅读(148) 评论(0) 推荐(0)
摘要: 如左上可设置锚点为(0,1) 阅读全文
posted @ 2019-12-09 17:04 流星曳尾 阅读(216) 评论(0) 推荐(0)
摘要: node.setUserData();//设置每个节点的datanode.getUserData(); 阅读全文
posted @ 2019-12-09 16:21 流星曳尾 阅读(340) 评论(0) 推荐(0)
摘要: 如题 阅读全文
posted @ 2019-12-07 19:47 流星曳尾 阅读(423) 评论(0) 推荐(0)
摘要: 需将拖动物坐标和要飞向物坐标转化为整个layer的坐标,因为人们判断远近是根据整个layer来看的。 阅读全文
posted @ 2019-12-07 11:13 流星曳尾 阅读(315) 评论(0) 推荐(0)
摘要: 可能是json文件中file的Path不对引起的。因为生成的path是根据文件在项目中的path生成的,即当此特效不是项目的一级目录时,会带有项目中上级目录,导致找不到文件(不会报错)。 ccs.load(jsonfile,josnfile的上级目录)中的josnfile的上级目录加上json文件中 阅读全文
posted @ 2019-11-26 14:51 流星曳尾 阅读(166) 评论(0) 推荐(0)
摘要: cc.rectContainsPoint(rect, point);此中rect常用node.getBoundingBox()方法取得,而这个方法通过node的x,y和width,height算得。也就带来了此中rect常用node和point在不同parent下时,坐标系不同。当使用时,应统一坐标 阅读全文
posted @ 2019-11-25 14:38 流星曳尾 阅读(1258) 评论(0) 推荐(0)
摘要: 如题 阅读全文
posted @ 2019-11-22 14:36 流星曳尾 阅读(138) 评论(0) 推荐(0)
摘要: let testLayer = new TestLayer1();this.addChild(testLayer);let TestLayer1 = cc.Layer.extend({ ctor:function(){ this._super(); }, onEnter: function () { 阅读全文
posted @ 2019-11-22 14:29 流星曳尾 阅读(159) 评论(0) 推荐(0)
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 38 下一页