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

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

1. Laya.Pool用法 [ 100%]

..."proto_ParamsProto";         constructor() {             // Pool.recover(ProtoPool.PROTO_HEAD, new com.bigao.h5.proto.Head());             // Pool.recover(ProtoPool.PROTO_BINARY_REQUEST, new com.bigao.h5.proto.BinaryRequest());             // Pool.recover(ProtoPool.PROTO_PARAMS...

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

2. Poolrecover方法无法回收 [ 99%]

Poolrecover方法无法回收  laya3.0的这个方法是不是改得有问题,好像永远回收不进去的 附件 : --> 2023-08-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 mainzone 赞同来自: htt...

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

3. Laya.Pool.recover("people", p)是什么意思? [ 99%]

Laya.Pool.recover("people", p)是什么意思? 有大神能告知下这句话的的具体作用吗,还有各参数的意义,最好能说得详细些,我在开发中发现用了这句之后会导致我本来被回收的对象,后来又无缘无故的出现了! 2016-09-21 添加评论 免...

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

4. box2d引擎报错问题 [ 96%]

...关逻辑代码如下: moveSuccess(){ this.owner.removeSelf(); Laya.Pool.recover("flyCat", this.owner) } onTriggerEnter(other: any, self: any, contact: any): void { if (other.label === "cloud") { Laya.Tween.clearAll(this._sp) let effect: Laya.Animation = Laya.Pool.getItemByCreateFun("deathEffect",...

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

5. Laya.Pool.getItemByClass 找不到上次释放的对象 [ 95%]

...上次释放的对象 为了学习Laya.Pool.getItemByClass 和 Laya.Pool.recover ,做了一个简单的测试,代码如下:  //从POOL里获取BackGround对象 var bg1:BackGround= Laya.Pool.getItemByClass("mybg",BackGround); Laya.stage.addChild(bg1); console.log("bg1->",bg1); //对象放...

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

6. [LayaAir3]Pool对象池获取继承对象时会返回基类对象 [ 91%]

...ool.createByClass(TestClass); console.log('item1:', item1.type); Laya.Pool.recoverByClass(item1); let item2 = Laya.Pool.createByClass(TestClass2); console.log('item2:', item2.type); console.log(item1 == item2); } } export class TestClass { type = 0; } export class TestClass2 extends TestClass { cons...

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

7. Laya.Pool缓存池问题 [ 90%]

...型标字符", "用于创建该类型对象的类"); Pool.recover( "对象类型标字符", "要存储的对象"); 15818760256 • 2018-04-17 16:56 @w1114367261:是的呀。。没错呀。。其实数组里的key就是获取时的标识符,是一样的。。var r...

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

8. 使用Pool出错,怎么解决??? [ 84%]

...么解决??? Pool再重新创建有问题?在用代码移除Pool.recover("ball", Balloon);后再重新var ballx:Balloon= Pool.getItemByClass("ball", Balloon);这样会有问题。 2016-12-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容...

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

9. Laya.Pool.getItemByClass创建的对象放不回对象池 [ 83%]

...池 Pool.getItemByClass创建的对象没有标记Pool.POOLSIGN 导致Pool.recover没有回收对象   另外Pool.createByClass也是调用Pool.getItemByClass返回对象的 所以这两个方法都有影响   附件 : --> 2023-07-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...

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

10. 如何完全删除精灵 并回收内存 [ 82%]

... = laya.utils.Pool.getItem('Text') } container.addChild(t) laya.utils.Pool.recover('Text', t) } laya.utils.Pool.recover('Container', container) Laya.stage.addChild(container) container.removeSelf() } laya.utils.Pool.clearBySign('Text') laya.utils.Pool.clearBySign('Container') container = null }, 100...

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