上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 36 下一页
摘要: 如左上可设置锚点为(0,1) 阅读全文
posted @ 2019-12-09 17:04 流星曳尾 阅读(210) 评论(0) 推荐(0) 编辑
摘要: node.setUserData();//设置每个节点的datanode.getUserData(); 阅读全文
posted @ 2019-12-09 16:21 流星曳尾 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 如题 阅读全文
posted @ 2019-12-07 19:47 流星曳尾 阅读(400) 评论(0) 推荐(0) 编辑
摘要: 需将拖动物坐标和要飞向物坐标转化为整个layer的坐标,因为人们判断远近是根据整个layer来看的。 阅读全文
posted @ 2019-12-07 11:13 流星曳尾 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 可能是json文件中file的Path不对引起的。因为生成的path是根据文件在项目中的path生成的,即当此特效不是项目的一级目录时,会带有项目中上级目录,导致找不到文件(不会报错)。 ccs.load(jsonfile,josnfile的上级目录)中的josnfile的上级目录加上json文件中 阅读全文
posted @ 2019-11-26 14:51 流星曳尾 阅读(161) 评论(0) 推荐(0) 编辑
摘要: cc.rectContainsPoint(rect, point);此中rect常用node.getBoundingBox()方法取得,而这个方法通过node的x,y和width,height算得。也就带来了此中rect常用node和point在不同parent下时,坐标系不同。当使用时,应统一坐标 阅读全文
posted @ 2019-11-25 14:38 流星曳尾 阅读(1215) 评论(0) 推荐(0) 编辑
摘要: 如题 阅读全文
posted @ 2019-11-22 14:36 流星曳尾 阅读(129) 评论(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 流星曳尾 阅读(156) 评论(0) 推荐(0) 编辑
摘要: let progressTimer= new cc.ProgressTimer(new cc.Sprite(fileName));this.addChild(progressTimer);progressTimer.setType(cc.ProgressTimer.TYPE_RADIAL);//圆形 阅读全文
posted @ 2019-11-20 16:02 流星曳尾 阅读(573) 评论(0) 推荐(0) 编辑
摘要: testSprite.runAction(cc.Sequence(cc.moveTo(x,y), cc.CallFunc(Func, this))); cc.CallFunc 调用回调函数 阅读全文
posted @ 2019-11-18 16:52 流星曳尾 阅读(157) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 36 下一页