• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 99 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0040 秒)

41. Laya.loader.create 进度回调函数执行两次!!! [ 56%]

...anager.prototype.onProgress = function(value) { console.log("value=="+Math.floor(value*100)+"%"); }   输出结果: 0.19186599730944645 0.5251993306427798 1 0.5002049180327869 0.5626793032786885 0.6251536885245902 0.6876280737704918 0.7501024590163934 0.8125768442622952 0.8750512295081967 0.93752...

来源: Laya_社区 发布时间: 20180620

42. 这方法加载不出来图片 Mac电脑 [ 56%]

...图片 Mac电脑 var t:Laya.Texture = Laya.loader.getRes("res/RunGameImg/floor.png"); var ape: Sprite = new Sprite(); ape.graphics.drawTexture(t, 0, 0); this.addChild(ape); ape.pos(20, 220); 2017-05-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...

来源: Laya_社区 发布时间: 20170517

43. list随机生成图片优化 [ 56%]

list随机生成图片优化 var aa:int= Math.floor((Math.random()*4)+1); var bb:int; switch(aa) { case 1: bb=2; break; case 2: bb=4; break; case 3: bb=1; break; case 4: bb=3; break; } var img:Image = cell.getChildByName("img1") as Image; img.skin ="battle/xuanshangyu/Image_"+aa+"00"+bb+".png"; 一...

来源: Laya_社区 发布时间: 20170616

44. 路径显示会添加DrawCall,每增加一条路径都会添加,有什么办法降DrawCall [ 56%]

...h.PI * 180; _path2.pos(a.x,a.y); this.addChild(_path2); var len:int = Math.floor(GetPathLen()/PATH_LEN)+2; SetPathArr(arr,_path); SetPathArr(arr2,_path2); //注释下面这行就正常了 _path.scrollRect = new Rectangle(0,0,(len-3)*PATH_LEN-30,58); _path2.scrollRect = new Rectangle(0,0,(len-3)*PATH...

来源: Laya_社区 发布时间: 20171129

45. 骨灰级的bug [ 56%]

... 222行 , 二二二。。。。。 _currentKeyframeIndex = Math.max(Math.floor(currentPlayTime / cacheFrameInterval), 0);//TODO:矫正   修正后的正确值: _currentKeyframeIndex = Math.round(currentPlayTime / cacheFrameInterval);//TODO:矫正     不修正的话,此条件一直不会满...

来源: Laya_社区 发布时间: 20190309

46. 为什么这个图片还是随机切换不了,新手求帮忙 [ 55%]

...odo 你好   以下代码是用Image的skin来替换资源var index= Math.floor(Math.random()*num); var img= new Laya.Image(); Laya.stage.addChild(img); img.skin = "res/"+index+".png"; 2017-01-11 1 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发...

来源: Laya_社区 发布时间: 20170111

47. list功能改变图片皮肤 [ 55%]

...:Number=0;q<130;q++){ var first:Object= new Object(); //first.lbl =Math.floor(Math.random()*3+1) ; if(q == 1) { var cc:*=_tempFruitUi.panel; var dd:List=aa.getChildByName("firstList") as List; var itemB:Box = dd.getCell(0); var specificPic:Image = itemB.getChildByName("img1") as Image; specificPi...

来源: Laya_社区 发布时间: 20170616

48. ide跑没问题,安卓包跑报错 [ 55%]

...mp;& this.bodyArr.length < this.bodyMaxNum) { let addBodyNum = Math.floor(this.eatBean / this.bodyBeanNum) let x = this.bodyArr[this.bodyArr.length - 1].x 。。。。。。 } let x = this.bodyArr[this.bodyArr.length - 1].x 这一句报错   附件 : --> 2018-06-01 添加评论 免费帖 -->...

来源: Laya_社区 发布时间: 20180601

49. 所能支持的最多对象数量是多少? [ 54%]

...量是多少? throw Error("IBQuadrangle count:"+count+" must<:"+Math.floor(65535 / 4)); 做了一个网页版的地图编辑器,代替了tilemap ,但是遇到一个问题,地图打小限制了,Laya最大支持的对象数量有限制,多了会报错,就是个错,想问一下怎么...

来源: Laya_社区 发布时间: 20180627

50. 读取大块材质中的图片并图片切割 [ 54%]

...for (var i:int = 5; i > 0; i-- ){     data["item" i] = {index:Math.floor(temp)};     temp = temp/10;    }    trace(this.score);    this.scorebox.dataSource = data;   } 2017-02-21 0 0 分享 微博 QZONE 微信 cuixueying 赞同来自: 直接使用IDE下提供的Clip组件实现...

来源: Laya_社区 发布时间: 20170221