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

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

41. 创建laya的视图销毁destroy()清除不了 [ 66%]

...s.display); } public destroy():void { this.display.destroy(); this.display.removeSelf(); super.destroy(); } }就是这段简单的测试代码,怎么销毁,内存还是创建后的大小 2017-02-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...

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

42. LayaNative2.0 UI移除舞台,再添加必然无法显示 [ 65%]

...d { if (c % 2 == 0) { _con3.addChild(_p); _con3.addChild(_p2); } else { _p.removeSelf(); _p2.removeSelf(); } c++; Laya.timer.once(2000, this, ShowHide); }   【native2.0中】stage上加几个平级container,然后再同一container上加两个ui,移除舞台后再加上必然无法显示 网...

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

43. 请问UI之间的场景切换要怎么写 [ 63%]

...); Laya.stage.addChild(Laya.sg_sign); } function onWxSign1(){ Laya.sg_sign.removeSelf(); Laya.Pool.recover("sg_sign",Laya.sg_sign); Laya.sg_index = new sg_index(); Laya.stage.addChild(Laya.sg_index); } 这样写可以吗 还有ui和代码创建出来 之间的切换要怎么写 2017-07-25 添加评...

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

44. LayaBox进阶之UI管理类 [ 63%]

...his.getView(clazz); let index: number = this.getViewIndex(clazz); if(v){ v.removeSelf(); this.uiList.splice(index,1); } }[/i] [i] private getViewIndex(clazz: any):number{ for(let i:number =0 ; i<this.uiList.length ; i++){ let uiData = this.uiList[i]; if(uiData.clazz == clazz){ return i; } } retu...

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

45. 3D物体检测到碰撞后,被碰撞物被移除的时候过30秒再次出现?并添加到舞台 [ 63%]

...; function Wipe() { console.log(other._owner); //移除自己 other._owner.removeSelf(); return; } } else { var move1 = new Laya.Vector3(0.02, 0, 0); var move2 = new Laya.Vector3(-0.02, 0, 0); Laya.timer.once(0, null, Right); Laya.timer.once(50, null, Left); function Right() { other.owner.transform....

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

46. 使用对象池重复使用skeleton报错,请问有解决方案吗?谢谢 [ 62%]

... }   function completeHandler() { mArmature.stop();         mArmature.removeSelf();         mArmature.removeChildren();         mArmature.destroy(true);           Laya.Pool.recover('Skeleton', mArmature); }   function play() { mCurrIndex++; if (mCurrIndex >= mArmature.getAnimNu...

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

47. 动画挂点(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 62%]

....role); this.aniSprte3D2.removeChild(this.role); //移除龙2 this.dragon2.removeSelf(); //将role添加到场景上,同时播放hello动画 this.scene.addChild(this.role); this.animator.play("hello"); ``` ![](img/4.gif)(图4)

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

48. 动画挂点(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 62%]

....role); this.aniSprte3D2.removeChild(this.role); //移除龙2 this.dragon2.removeSelf(); //将role添加到场景上,同时播放hello动画 this.scene.addChild(this.role); this.animator.play("hello"); ``` ![](img/4.gif)(图4)

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

49. Spine 间隔一段时间卡顿5000毫秒左右,期间GPU占用极高, Demo已上传 [ 62%]

...his, (e) => { if (e.name == "xiaoshi") { ufo.offAllCaller(this); // ufo.removeSelf();   } });  })); }  genSpine(url, handler: Laya.Handler) { var templet = new Laya.SpineTemplet(Laya.SpineVersion.v4_0); templet.on(Laya.Event.COMPLETE, handler.caller, handler.method); templet.on(Laya.Event.ERRO...

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

50. 分享:IDE使用SWF动画的销毁与反复创建 [ 62%]

...();             testView.destroy();             testView.removeSelf();             //destroy的时候movieclip把小图都清掉了,但是movieclip不知道你是用图集加载的,图集缓存文件还在,但是图集里的小图已经没有了             ...

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