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

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

1861. Laya.Resource.destroyUnusedResources导致界面变形 [ 76%]

...代码: private onBtnClick(e:Laya.Event):void { switch(e.target) { case this.btn1: Laya.Scene.open("ui/p1/Page1.scene", false); break; case this.btn2: Laya.Scene.close("ui/p1/Page1.scene"); break; case this.btn3: Laya.Resource.destroyUnusedResources(); break; } }问题:特定操作会让界面...

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

1862. 关于HttpRequest [ 76%]

...Encode(obj); var hr = new Laya.HttpRequest(); hr.once(Laya.Event.PROGRESS, this, function (e) { console.log(e); }); hr.once(Laya.Event.COMPLETE, this, function () { console.log(hr.data); }); hr.once(Laya.Event.ERROR, this, function (e) { console.log(e); }); hr.send('http://stone.tt.be-xx.com/git/tes...

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

1863. Clip切片动画有无播放完成的回调方法?有无检测播放次的方法? [ 76%]

...进的方法? 我尝试了如下方法,但是没有效果,求解。 this.clip_wpLevelup.on(Laya.Event.STOPPED, this, this.stopAndShowLvupResult); 2018-06-09 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Lay...

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

1864. 关于mouseThough=true的问题 [ 76%]

...ot;#ff0000"; // trace(Laya.timer.toString()); // Laya.timer.callLater(this,onLater); // trace(Laya.timer.toString()); var assets:Array = []; assets.push({url:[ "fish_6.png" ],type:Loader.IMAGE}); Laya.loader.load(assets,Handler.create(this,onLoaded)); } private function onLoaded():voi...

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

1865. 多scene3d报内存不足问题 [ 76%]

... the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 "). Build with -s ASSERTIONS=1 for more info.   代码: this.m_scene = Laya.loader.getRes(this.getScenePath()); new Laya.Scene3D() new Laya.Scene3D()   第三个new 就报...

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

1866. 如何自定义Shader(TypeScript-3D基础(TS)-LayaAir3D之Shader) [ 76%]

...Material { constructor() { super(); //设置本材质使用的shader名字 this.setShaderName("CustomShader"); } } ``` #### 4.使用自定义材质 ​ 在使用自定义材质之前,一定要记得初始化自己的Shader。LayaAir中自带的材质会随着`Laya3D.init`初始化。这里我们...

来源: Laya2.0_文档 发布时间: 20210715

1867. LayaBox HelloWorld实战 [ 76%]

...oWorld extends Laya.Scene { constructor() { super(); HelloWorld.instance = this; } onBtnShowClick(){ var dialog = new Laya.Dialog(); dialog.width=300; dialog.height=600; //var bg = new Laya.Image('comp/img_bg.png'); //dialog.addChild(bg); var button = new Laya.Button('comp/button.png'); button.label...

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

1868. skeleton的_onAniSoundStoped清除的时候有时会报undefined错误 [ 76%]

...hannel */ private _onAniSoundStoped(force: boolean): void { for (let len = this._soundChannelArr.length, i = 0; i < len; i++) { let channel = this._soundChannelArr[i]; if (channel.isStopped || force) { !channel.isStopped && channel.stop(); this._soundChannelArr.splice(i, 1); // SoundManag...

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

1869. 创建Laya.PolygonCollider后,页面不显示,导致其他碰撞体也不显示 [ 76%]

...a.PolygonCollider后,页面不显示,导致其他碰撞体也不显示 this.sp = new Laya.Sprite();  let rb = this.sp.addComponent(Laya.RigidBody); let polygonCollider4 = this.sp.addComponent(Laya.PolygonCollider); polygonCollider4.points = "429,1094,433,1094,440,1094,442,1094,446,1094,448,1094...

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

1870. 可能有个昵称叫做“syy”的一只掉进粪坑里的猪会在下面乱叫 [ 76%]

...绍方法   {Laya.loader.create("prefab/预设名字.json",Handler.create(this,onComplete));}private function onComplete(obj:Object):Void{一个预设变量.json = ojb一个sprite = Pool.getItemByCreateFun("自己起一个名字", this.一个预设变量.create, this.一个预设变量);} 2018-12-0...

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