大约有 87 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0043 秒)
Laya_社区(56) Laya2.0_文档(8) Laya_示例(7) Laya2.0_示例(7) Laya3.0_文档(6) laya_api(1) Laya3.0_api(1) Laya2.0_api(1)
... if (i!=whichistrue) { aniname="lose_1_"+aniname+".ani"; } else { ran=Math.random(); aniname="win_1_"+aniname+".ani"; } item.loadAnimation(aniname); item.x=60+(i-1)*120; item.y=y; item.size(80,80); item.name=aniname; this.doworkui.addChild(item); 2017-11-06 0 0 分享 微博 QZONE 微信 ysshao ...
来源: Laya_社区 发布时间: 20171106
...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
...ei - as3、as2、h5 赞同来自: <script src='LayaSample.max.js?'+Math.random() loader='laya'></script> 我是在后面加个随机数,这样能看到更新的laya js,如果更新同名图片,在loadImg时在图片后面加个图片版本号“图片url?v=”+imgVersion,每次...
来源: Laya_社区 发布时间: 20170721
... = (yield asyncs.downloadSync(urlpath + 'update/assetsid.txt?rand=' + Math.random() * Date.now(), false, null)); console.log("assetsid old:" + curassets + " new:" + assetsidStr); if (!assetsidStr) { if (curassets && curassets != "") { if (window["onLayaInitError"]) { isDccOk = false; window[...
来源: Laya_社区 发布时间: 20180111
...(var i=0;i<10000;i++) { this.text=new Laya.Text(); this.text.text=(Math.random()*100).toFixed(0); this.text.color="#CCCCCC"; this.text.x=Math.random()*550; this.text.y=Math.random()*400; textBox.addChild(this.text); } Laya.stage.addChild(textBox); } } 下面是笔者电脑上的运行时截图,...
来源: Laya3.0_文档 发布时间: 20251010
...更新了,会自动给文件加版本号:res.cdn.xxx/res/a.png?v=Math.random 这种方式么,这种好像只能破坏本地缓存,无法破坏节点缓存吧? 麻烦给个详细解释,感谢!
来源: Laya_社区 发布时间: 20180209
...r texture2D:Texture2D = new Texture2D(); texture2D["onAsynLoaded"](""+Math.random(),texture.bitmap); createTextureCallBack.call(callbackThis,texture2D); }3. 最终的调用: public function init(){ var s:sprite = create_a_big_sprite(); Laya.timer.once(250,this,function():void{ GameUtil.createTextu...
来源: Laya_社区 发布时间: 20170718
...会导致显示异常,其他child消失 parent.child_1.rotation = Math.random() * 180; } } class ChildView extends ui.ChildViewUI{ constructor(){ super(); var panel = new Laya.Panel(); panel.pos(0,0); panel.size(200,50); this.addChild(panel); var panelChild = new Laya.Sprite(); panelChild.pos(0,0)...
来源: Laya_社区 发布时间: 20170829
...个素材是 32 * 20 拼起来的 this.y = 32 * 6 + 32 * parseInt(8 * Math.random()); if(this.bg == null){ //贴图纹理 this.bgTexture = Laya.loader.getRes("res/floor.png"); this.bg = new laya.display.Sprite(); this.bg.graphics.clear(); this.addChild(this.bg); //因为上面的图片是截取的 ...
来源: Laya_社区 发布时间: 20160801
... }; var rock_:Object = Matter.Bodies.polygon(Math.random()*100+100, 50, 3, 30, rockOptions); Matter.World.add(engine.world, [ rock_]); } } } 2017-08-22 0 0 分享 微博 QZONE 微信 layazzzooovvv 赞同来自: 我用js,调试了...
来源: Laya_社区 发布时间: 20170822