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

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

51. drawTexture 画出来的数据会有以前的数据 [ 60%]

...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

52. 请问我怎么在js中调用这个方法 [ 59%]

...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

53. 强转报错:无法解析int强制转换 [ 59%]

强转报错:无法解析int强制转换 var num:int=int(Math.random()*6); trace(num); 此时就会报错,无法解析int强制转换 2016-05-01 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 cuixueying 赞...

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

54. Tween动画中的Sprite点击事件失效 [ 59%]

...a.Tween.to(self.loserPrize, {      y: Laya.Browser.clientHeight }, Math.random() * 1500); self.gameZone.addChild(self.loserPrize);   大概如上 随手写出来的,就是一个礼物从上往下掉的时候如果点击到了就能领取。。但是发现动画时候的Sprite点击不了。。...

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

55. 怀疑版本控制有bug [ 59%]

...同来自: version.json后面增加随机数 比如"version.json?="+Math.random() 2018-03-15 0 3 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起人 liwenhua 相关问题 LayaAir3D UnityPlugin 使用须知-版本更新-...

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

56. 对象池的使用 [ 58%]

...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

57. 请问 在LayaAir中怎么样实现随机数 比如两个动画,随机播放其中的一个? [ 58%]

...: 与内容相关的链接 提交 2 个回复 qian 赞同来自: 用Math.random() 2018-01-04 0 1 分享 微博 QZONE 微信 qian 赞同来自: 有问题及时反馈 2018-01-04 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回...

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

58. 图片显示异常 [ 58%]

...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

59. 【简单跑酷--JS版】---Lv.6 终篇 [ 57%]

...个素材是 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

60. 给图片节点添加新创建的图片,会报这个错:node._setParent is not a function [ 57%]

... 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