上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 36 下一页
摘要: let arr = [51,68,98,78];let result = arr.splice(1,1);//[68]let arr2 = [51,68,98,78];let result2 = arr2.splice(1,2);//[98,78] 阅读全文
posted @ 2019-12-25 14:25 流星曳尾 阅读(1067) 评论(1) 推荐(0) 编辑
摘要: 发现是因为没有addChild到父节点上引起的 阅读全文
posted @ 2019-12-19 19:12 流星曳尾 阅读(343) 评论(0) 推荐(0) 编辑
摘要: cc.repeat(action, times)cc.repeatForever(action)例:sprite.runAction(cc.repeatForever(cc.rotateBy(1,360))); 阅读全文
posted @ 2019-12-19 15:33 流星曳尾 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 如题 阅读全文
posted @ 2019-12-18 15:01 流星曳尾 阅读(124) 评论(0) 推荐(0) 编辑
摘要: cc.formatStr() 第一个变量为含有 %s 或 %d 的字符串 后面依次为%s或%d对应的内容 阅读全文
posted @ 2019-12-17 15:25 流星曳尾 阅读(552) 评论(0) 推荐(0) 编辑
摘要: let arr1 = [1,3,5],arr2 = [2,32,78],arr3 = [];arr3 = arr1.concat(arr2);// arr1 = [1,3,5] arr2 = [2,32,78] arr3 = [1,3,5,2,32,78] 阅读全文
posted @ 2019-12-16 14:16 流星曳尾 阅读(575) 评论(0) 推荐(0) 编辑
摘要: 通过事件传递信息 阅读全文
posted @ 2019-12-12 17:24 流星曳尾 阅读(73) 评论(0) 推荐(0) 编辑
摘要: et listView = new ccui.ListView();this.addChild(listView,9999);listView.setDirection(ccui.ScrollView.DIR_VERTICAL);listView.setTouchEnabled(true);list 阅读全文
posted @ 2019-12-12 14:59 流星曳尾 阅读(540) 评论(0) 推荐(0) 编辑
摘要: //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 流星曳尾 阅读(245) 评论(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 流星曳尾 阅读(128) 评论(0) 推荐(0) 编辑
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 36 下一页