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

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

371. 小游戏环境下 声音的缓存机制导致更换声音文件失败 [ 87%]

...             url = URL.formatURL(url);             this.url = url;             this.readyUrl = url;             if (MiniSound._audioCache[this.readyUrl]) {                 this.event(/*laya.events.Event.COMPLETE*/"complete");      ...

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

372. js执行once时如何改变执行域 [ 87%]

js执行once时如何改变执行域 _proto.onMsgCallBack = function () { this.kwxSocket.OnMessageCallBack=function(msg){ console.log("回调"+msg); var dataTemp = JSON.parse(msg); console.log(dataTemp.d); kwxGame.prototype.cardData = dataTemp.d; [b][i]Laya.timer.once(1000, this, this.onOncePiao); ...

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

373. 分享:为List组件下Item(Box)下的Button(或其他组件)进行监听! [ 87%]

...vents.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //list赋值,先获得一个数据源数组 var arr = ; for (var i = 0; i < 100; i++) { arr.push({label: "item " + i, clip: i % 9,btn:"btn"+i}); } //给list赋值更改list的显示 this.list.array = arr; //给lis...

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

374. 给以个对象绑定两个on方法为什么只能执行一次 ? [ 87%]

...—操作对象-回调     function BtnFeed(obj,backEdHd){         this.obj = obj;         this.backEdHd = backEdHd||void(0);         this.clickEnd = function(){             Laya.timer.once(0,this,this.reset);         };         this.reset = function(){             ...

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

375. 对话框点击空白处无法关闭 [ 87%]

...话框var testUI=(function(_super){ function testUI(){ testUI.__super.call(this); } CLASS$(testUI,'ui.testUI',_super); var __proto__=testUI.prototype; __proto__.createChildren=function(){ laya.ui.Component.prototype.createChildren.call(this); this.createView(testUI.uiView); } testUI.uiView={"type":"...

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

376. Laya.Timer.clear 的源码可能有个问题。 [ 86%]

...最多执行6次 for(let i = 0; i < 6; i++){ Laya.timer.once(i * 1000, this, this.b, [i], false); } //遇到一些需求变化,我希望在2s之后(可能其它某些触发情况), 停止执行 b 函数(行为) Laya.timer.once(2000,this,()=>{ Laya.timer.clear(this, this.b); }); [/i]//程...

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

377. Laya.Video内存泄漏问题 [ 86%]

...er.load([{url: video_url, type: Laya.Loader.BUFFER }], Laya.Handler.create(this, createVideo)); var v; function createVideo() { var video_file = new Blob([Laya.loader.getRes(video_url)], {type: 'video/webm'}); var blob_url = URL.createObjectURL(video_file); var video = new Laya.Video(); video.loop =...

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

378. 列表组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 86%]

...(var m: number = 0; m < 20; m++) { data.push({ m_label: "No." + m }); } this.list.array = data; } } 代码中,m_label的命名要与List列表项下的Label组件命名相同。 1.2.5 运行查看效果 将脚本挂载到Scene2D场景上,然后将List组件拖入到脚本暴露出来的属性...

来源: Laya3.0_文档 发布时间: 20251010

379. [LayaAir3]LAYAAIR 3.3 和 LAYANATIVE 的VIDEO 支持 M3U8文件吗? [ 86%]

...a(video); hls.on(HLS.Events.MEDIA_ATTACHED, () => { video.muted = true; this.playVideo(); }); hls.on(HLS.Events.ERROR, (event, data) => { console.log("HLS加载失败"); }); hlsxx = hls;//方便销毁用hlsxx.destroy(); }else if(videoTexture.canPlayType("m3u8")){ this.playVideo(); videoTexture...

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

380. spine 推荐使用方式 [ 86%]

...     */     __proto.destroyTexture=function(){         if(this._mainTexture!=null){             this._mainTexture.disposeBitmap();         }         this._needRecoverTexture = true;     }     /**      * 恢复纹理      */     __proto....

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