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

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

1. 2.10.0 destroy+removeSelf 函数 导致脚本生命周期不正确。 [ 100%]

2.10.0 destroy+removeSelf 函数 导致脚本生命周期不正确。   问题:如题 版本:2.10.0 源码:附件或者直接看图,就这么几句话   具体描述: 找个地方把脚本添加到3d对象上,然后看输出, 正常情况是:清理之后输出会停止     附...

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

2. removeSelf()这个方法调用后是不是会移除对象上添加的一切东西? [ 95%]

removeSelf()这个方法调用后是不是会移除对象上添加的一切东西? 我创建一个ui界面。。。在这个上面调用了.on的点击事件,调用了定时器。。还添加了其它一些image,sprite,label等对象。。   如果我调用this.removeSelf()是不是会把t...

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

3. 两个小问题 [ 91%]

...有时还会发送事件 this.event(...),在关闭面板时设置 this.removeSelf() ,下次生成同类型的对象面板可正常打开;若在关闭时设成 this.destroy() 或 this.destroy(false),新面板打开时会报错 cannot read property 'xxx' of null。请问 this.removeSelf() 是...

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

4. dialog黑色遮罩删除不了 [ 87%]

...alog黑色遮罩删除不了 你好,为何我的dialog用destroy(true)或removeSelf()删除,背景的黑色遮罩都删除不了? 2018-07-29 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 4 个回复 Laya_Aaron 赞同...

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

5. 分享:销毁龙骨动画! [ 84%]

...e.stop();//停止龙骨动画播放 removeEvent();//移除事件 mArmature.removeSelf();//从显示列表移除龙骨动画本身 mArmature.removeChildren();//从显示列表移除龙骨动画子对象 mArmature.destroy(true);//从显存销毁龙骨动画及其子对象 mFactory.destroy();//释放...

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

6. 事件函数作用域问题 [ 82%]

...gin.on(Laya.Event.CLICK, null, ()=>{ if (this.loginDig) { this.loginDig.removeSelf(); this.loginDig.destroy(); } 2.this.btn_ok.on(Laya.Event.RIGHT_CLICK, this, this.OnBut_Open); OnBut_Open() : void { this.removeSelf(); this.destroy(); } 就是这两个函数,是不是就是使用lamb表达式...

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

7. 关于removeChildren、 destroydestroyChildren的疑惑 [ 80%]

...stage.numChildren; i++) { var object = Laya.stage.getChildAt(i); // object.removeSelf(); Laya.stage.removeChildAt(i); object.destroy(true); }该对象继续在屏幕上显示。。。(IDE版本1.7.10.bate) 使用Laya.stage.destroyChildren();是可以移除该对象的 2017-10-12 添加评论 免...

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

8. 龙骨动画的监听回调,有时能回调,有时不能回调 [ 80%]

...Armature(armature:Laya.Skeleton){ if(armature == null){ return; } armature.removeSelf(); this.mArmatureUnUsed.push(armature); }  public playFail(armature:Laya.Skeleton){ if(armature == null){ return; } armature.play('fail',true); }  public playStand(armature:Laya.Skeleton){ if(armature == null){ r...

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

9. 注册函数里面 事件侦听函数的执行域 的详解 [ 80%]

...gin.on(Laya.Event.CLICK, null, ()=>{ if (this.loginDig) { this.loginDig.removeSelf(); this.loginDig.destroy(); } 2.this.btn_ok.on(Laya.Event.RIGHT_CLICK, this, this.OnBut_Open); OnBut_Open() : void { this.removeSelf(); this.destroy(); } 就是这两个函数,是不是就是使用lamb表达式...

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

10. 【LIST无法拖动】参照官方实例做的 [ 79%]

...(ui as GameUI1).nickname_ = this.nickname_;         this.list.removeSelf();         this.list.destroy();         this.removeSelf();         this.destroy();         Laya.stage.addChild(ui);      }     jumpScene()     {            let...

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