大约有 20 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0037 秒)
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
...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
... 以下代码是用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
...<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
...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
...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
...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
... * 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
...*/ 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
...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