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

大约有 965 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0064 秒)

291. 有关Laya3D碰撞检测疑问 [ 69%]

...体";  Laya.timer.frameLoop(1, this, this.checkHit);  this.loadUI();  console.log("碰撞结果:" + boxCollider1.boundBox.containsSphere(cylinder.meshRender.boundingSphere)); console.log("碰撞结果:" + boxCollider1.boundBox.containsBoundBox(cylinder.meshRender.boundingBox)); console.log("碰...

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

292. 加载预制体json,返回值不统一 [ 69%]

...n", Laya.Handler.create(this, function (obj) {             console.log('hero',obj);         }), null, Laya.Loader.PREFAB);         Laya.loader.create("prefab/WeiTiao.json", Laya.Handler.create(this, function (obj) {             console.log('WeiTiao',...

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

293. 多次加载一个页面出现_$P为null的情况 [ 68%]

...r.getUserGold(); if(gold > 500){ Online.joinGame().then(function(data){ console.log(data); StorageHelper.setDeskNo(data.desk.deskNo); StorageHelper.setDeskSeat(data.ownSeatNo); Laya.stage.destroyChildren(); var playSence = new OnlinePlaySence(data); Laya.stage.addChild(playSence); },function(data...

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

294. vivo小游戏 LayaIDE2.2.0使用fairygui报错 [ 68%]

...], Laya.Handler.create(this, this.onLoaded)); }  onLoaded(): void {     console.log('===================ss');      console.log('sssss', fgui.GRoot.inst.displayObject);     Laya.stage.addChild(fgui.GRoot.inst.displayObject);       fgui.UIPackage.addPackage("res/Basics");          ...

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

295. Laya下的图片上传示例(完整版) [ 68%]

...y):void { if(file.files.length>0) { if(20*1024<file.files[0].size) { console.log("图片大小不能超过20kb!") }else{ fileReader.readAsDataURL(file.files[0]); //转换图片格式为字符编码 } } }; fileReader.onload = function(e):void { if(Laya.Browser.window.FileReader.DONE == fileRead...

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

296. 怎么才能像HTML5中那样直接操作Canvas [ 68%]

...10, 150, 150,"red"); ctx.fillText("texttt",100,100,"","#ffffff","center"); console.log("draw complete"); 2017-05-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: LayaAir也是基于canvas...

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

297. 使用外部引擎播放layaair制作的.ani [ 68%]

...; //播放Animation动画 tl.play(); tl.on(Event.COMPLETE, this, () => {console.log('end')}); } 2018-08-23 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 zyx 相关问题 看了其他引擎才发现 LAYA 真的太太太太好用了!...

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

298. 怎么给List下的每个item中的button添加事件? [ 68%]

...;,i*100,800,100,60); btn.id= i; btns.push(btn); this.btnBox.addChild(btn); console.log(btn.id); } for(var i = 0; i < 5; i++){ btns[i].on(Laya.Event.CLICK,this,judge,[i]); } function judge(aa){ console.log("___________"+aa); } 我就是这么做的,结果打印出来全是4,前面的...

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

299. 在线急等,发现你们这个编译器一个bug,不能实现负负得正 [ 68%]

...moveDownBall = function(){ this.ball.x -= this.vx; this.ball.y += this.vy; console.log("111111"); this.vy *= 0.99; this.vy += 0.25; console.log("222222"); if (this.ball.y + this.vy >= this.stageHeight ||this.ball.y + this.vy <= 0) { this.vy = -this.vy; } if (this.ball.x + this.vx >= this.st...

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

300. tiledMap问题,getTileProperties获取地图属性不能获取到 [ 68%]

...ScreenPos(20,20); var pass = this.map.getTileProperties(0,idx - 1,'pass'); console.log('打印=======================================') console.log(idx, pass, this.map['_tileProperties'],this.map['_tileProperties2']); // 30 null {0:undefined} {} } }求官方给个回复 附件 : --> 2DTiled.zip 2019...

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