大约有 81 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0046 秒)
Laya_社区(55) Laya2.0_文档(8) Laya3.0_文档(6) Laya_示例(5) Laya2.0_示例(4) laya_api(1) Laya3.0_api(1) Laya2.0_api(1)
...ent.CLICK,this,runGame1); } private function runGame1():void { xNum = Math.random()*7 - 3; yNum = Math.random()*7 - 3; Laya.timer.loop(20,this,onRun); Laya.timer.frameLoop(10,this,refresh); } private function refresh():void { IconSpr.graphics.clear(); iconSpr.graphics.clear(); if(htmlCanvas) htmlCan...
来源: Laya_社区 发布时间: 20180113
...ion (Zszen) { var Test = (function () { function Test() { this.rand = Math.random(); } Test.output = function (){ console.log(this.rand); } return Test; }()); Zszen.Test = Test; })(Zszen || (Zszen = {}));我使用 var a = new Zszen.Test(); a.output(); //这句我调用说找不到, 应该怎么写...
来源: Laya_社区 发布时间: 20180112
强转报错:无法解析int强制转换 var num:int=int(Math.random()*6); trace(num); 此时就会报错,无法解析int强制转换 2016-05-01 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 cuixueying 赞...
来源: Laya_社区 发布时间: 20160501
...a.Tween.to(self.loserPrize, { y: Laya.Browser.clientHeight }, Math.random() * 1500); self.gameZone.addChild(self.loserPrize); 大概如上 随手写出来的,就是一个礼物从上往下掉的时候如果点击到了就能领取。。但是发现动画时候的Sprite点击不了。。...
来源: Laya_社区 发布时间: 20180222
...同来自: version.json后面增加随机数 比如"version.json?="+Math.random() 2018-03-15 0 3 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起人 liwenhua 相关问题 LayaAir3D UnityPlugin 使用须知-版本更新-...
来源: Laya_社区 发布时间: 20180315
...an:Image = Pool.getItemByClass("nam", Image); nan.skin = url; nan.x = Math.random() * 600 + 80; nan.y =-60; this.addChild(nan); } private function delRen():void { if(arr.length){ for (var i:uint = 0; i < arr.length; i++ ){ if (arr[i].y > 800){ Pool.recover("nan", Image); } }arr[i].visible = fa...
来源: Laya_社区 发布时间: 20171226
...: 与内容相关的链接 提交 2 个回复 qian 赞同来自: 用Math.random() 2018-01-04 0 1 分享 微博 QZONE 微信 qian 赞同来自: 有问题及时反馈 2018-01-04 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回...
来源: Laya_社区 发布时间: 20180104
...ata) { var data: any[] = []; listData.sort(function () { return 0.5 - Math.random(); }); listData.map((item, index) => { var hotShow: boolean = false; var newShow: boolean = false; if (index >= 3 && index < 8) { hotShow = true; } if (index >= 11 && index < 16) { ...
来源: Laya_社区 发布时间: 20200805
...个素材是 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_社区 发布时间: 20160803
... iRows = 1; iRows < this.intRows; iRows++) { let iNum = Math.round(Math.random() * this.intMaxLove); let imgSrc = "comp/heart"+iNum+".png"; let imgLove = new Image(imgSrc); console.log("imgLove ==="+imgLove); console.log("imgSrc === "+ imgSrc); //imgLove.pos(iRows*this._x + 120 , iColumns*this._y...
来源: Laya_社区 发布时间: 20190625