大约有 132 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0037 秒)
... if (this.cacheRect) this.cacheRect.recover(); this.cacheRect = null; return this; } _calculateCacheRect(sprite, tCacheType, x, y) { var _cacheStyle = sprite._cacheStyle; if ...
来源: Laya_社区 发布时间: 20210615
...aya.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
...urn this.data.length;} Dispose=()=>{ for(let i in this.data){ Laya.Pool.recover("Dispose",this.data[i]); } } } 2019-12-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回复 为什么被折叠? 0 个回复被折...
来源: Laya_社区 发布时间: 20191206
...里取出来的?如果是从对象池里取的话,得先把handler给recover掉,然后在设置xxx.handler = null 不然确实会出现“混乱" 我们项目深受其害 photon • 2021-07-13 11:02 比如你有一个管理类,启动一个loop,绑定管理类的一个方法handler ,...
来源: Laya_社区 发布时间: 20210701
...0) { this.DoLoadData(args.url); } else { console.log(data); } args.handler.recover(); } protected OnLoadDataCb(result:any):void { console.log("OnDownloadCb"); if (result != null) { console.log(typeof(result)); // console.log(result); } else { console.log("result is none"); } } 然后在调试中发...
来源: Laya_社区 发布时间: 20180604
...nStateExit, () => { aniNode.removeSelf();//删除动画节点 Laya.Pool.recover("effect", aniNode);//回收动画预制体到对象池中,方便下次复用。 }); return aniNode; } //组件被禁用时执行 onDisable(): void { //盒子被移除时,回收盒子到对象池,方便下次复...
来源: Laya3.0_文档 发布时间: 20251010
...除上次绘制的内容 for(var k=0;k<this.numChildren;k++){ Laya.Pool.recover("sprite",this._childs[k]); } this.removeChildren(); var charTotal: number = v.length; var charSps: any = ; for(var i=0;i<charTotal;i++){ var targetChar = v.substr(i,1); var charData: any = this._jsonData.frames[tar...
来源: Laya_社区 发布时间: 20161014
...ole.isBullet = false; role.visible = true; // 回收到对象池 Laya.Pool.recover("role",role); } } // 处理发射子弹逻辑 if(role.shootType > 0) { // 获取当前浏览器时间 var time = Laya.Browser.now(); // 如果当前时间大于下次射击时间 if(time > role.shootTime) { // ...
来源: Laya_社区 发布时间: 20170525
...ole.isBullet = false; role.visible = true; // 回收到对象池 Laya.Pool.recover("role",role); } } // 处理发射子弹逻辑 if(role.shootType > 0) { // 获取当前浏览器时间 var time = Laya.Browser.now(); // 如果当前时间大于下次射击时间 if(time > role.shootTime) { // ...
来源: Laya_社区 发布时间: 20170525
...弹到对象池,方便下次复用,减少对象创建开销 Laya.Pool.recover("bullet", this.owner); } } 在游戏中,将子弹添加到舞台上时,每次添加到舞台都得有初速度,但如果将onEnable()换成onAwake(),那么这个初速度就会失效。onUpdate()是每帧执行...
来源: Laya3.0_文档 发布时间: 20251010