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

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

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. 两个小问题 [ 90%]

...有时还会发送事件 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. destory方法怎么用? [ 85%]

destory方法怎么用? 用removeself()方法删除了某个对象,但是预预期绑定的timer.loop事件还是在运行,应该如何彻底销毁掉一个对象? 2018-06-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 内容相关的链接 ...

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

6. destroy节点后,报错 [ 84%]

...); for(let i=node.numChildren-1;i>=0;i--){ obj= node.getChildAt(i); obj.removeSelf(); if(obj.name=='Guan'){ this.guans.push(obj); }else if(obj.name=='Fangkuang'){ this.fangkuangs.push(obj); }else if(obj.name=='Cylinder'){ this.cylinders.push(obj); }else{ console.log('recycle loser'); } } } 开心...

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

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

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

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

8. 事件函数作用域问题 [ 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

9. 龙骨动画的监听回调,有时能回调,有时不能回调 [ 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

10. 删除节点的时候是用remove还是用destroy或者clear那种比较好号 [ 79%]

...只实例化一次,每次点击的时候先把原来的removeChild或者removeSelf(移除自身),然后在addChild添加。而不是点击一次就实例化一个

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