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

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

11. list随机生成图片优化 [ 75%]

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

12. 3D灯光与阴影 · LayaAir3.3 · 引擎文档 · LAYABOX [ 75%]

...ntLight.addComponent(Laya.PointLightCom); pointLightCom.range = 2.0 + Math.random() * 8.0; pointLightCom.color.setValue(Math.random(), Math.random(), Math.random(), 1); pointLightCom.intensity = 6.0 + Math.random() * 8; moverLights[i] = pointLight; offsets[i] = new Vector3((Math.random() - 0.5) * 10...

来源: Laya3.0_文档 发布时间: 20251010

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

...  以下代码是用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 个回复被折叠 要回复问题请先登录 发起人 Todo...

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

14. list功能改变图片皮肤 [ 74%]

...<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; specificPic.skin = "b...

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

15. 阻止点击穿透问题 [ 68%]

...n(); if(!Game.runing) { Game.runing = true; Game.stepNum = Math.floor(Math.random() * 6) + 1; console.log(Game.stepNum) Animate.role(Game.stepNum); } },[this.items.shaizi]);  弹层的代码: this.prizeAlertLayer = new Sprite(); this.prizeAlertLayer.zOrder = 90; this.prizeAlertLayer.size(W, H); ...

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

16. 3D性能优化 · LayaAir3.3 · 引擎文档 · LAYABOX [ 64%]

...lt; this._colorNums; i++) { let offset = i * 4; colorBuffer[offset] = Math.random(); colorBuffer[offset + 1] = Math.random(); colorBuffer[offset + 2] = Math.random(); colorBuffer[offset + 3] = 1; } //设置uniformbuffer this.batchMat.setBuffer("colormap", colorBuffer); } //随机生成_spriteNums数...

来源: Laya3.0_文档 发布时间: 20251010

17. 关于缓动函数from的一些问题记录 [ 59%]

...function changeColor(text){ console.log("update"); var c = Math.floor(Math.random()*4); console.log(c); switch(c) { case 0:text.color='red';break; case 1:text.color="blue";break; case 2:text.color ='black';break; case 3:text.color = 'green';break; case 4:text.color = "yellow";break; } console.log(te...

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

18. 缓动动画(JavaScript-LayaAir基础篇(JS)-动画基础) [ 41%]

... * txt 缓动对象 */ function updateColor(txt){ var c = Math.floor(Math.random()*3); switch (c) { case 0: txt.color = "#eee000"; break; case 1: txt.color = "#ffffff"; break; case 2: txt.color = "#ff0000"; break; default: txt.color = "#eee000"; break; } } /** * 缓动完成后的回调方法 * txt ...

来源: Laya2.0_文档 发布时间: 20210715

19. 缓动动画(TypeScript-LayaAir基础篇(TS)-动画基础) [ 39%]

...*/ private updateColor(txt:Laya.Text):void{ var c:number = Math.floor(Math.random()*3); switch (c) { case 0: txt.color = "#eee000"; break; case 1: txt.color = "#ffffff"; break; case 2: txt.color = "#ff0000"; break; default: txt.color = "#eee000"; break; } } /** * 缓动完成后的回调方法 * txt...

来源: Laya2.0_文档 发布时间: 20210715

20. LAYABOX游戏实时语音之APP版本 [ 33%]

...g getAudioPath(){ String audioPath = mStoragePath + "/"; audioPath += UUID.randomUUID().toString() + ".wav"; return audioPath; } public boolean onTouch(final String type){ switch(type){ case "d": mPTTStartTime = System.currentTimeMillis(); startRecordAudio(); return true; case "u": mAudioDownloaded ...

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