大约有 9 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0049 秒)
...景的管理一、IDE中的场景1.1 新建场景1.2 场景划分1.3 autoDestroyAtClosed属性1.4 mouseThrough属性二、代码中使用2.1 场景类2.2 打开场景2.3 关闭场景2.4 场景的加载页面2.5 销毁和垃圾回收场景的管理 LayaAir3.0继续延用2.0开发思路为组件化,...
来源: Laya3.0_文档 发布时间: 20251010
...缓动会自动停止。一般情况下,如果任务的目标对象有 destroyed 属性,则不需要设置此属性。如果任务的目标对象没有 destroyed 属性,则可以设置此属性。 * @returns 返回一个Tween对象。 */ static create(target?: any, lifecycleOwner?: { destroyed...
来源: Laya3.0_文档 发布时间: 20251010
...; }; //彻底销毁清理一个粒子特效对象 Clean(): void { if (this.destroyed) { return; } this.Recover(); if (this._particle && !this._particle.destroyed) { this._particle.removeSelf(); this._particle.destroy(true); this._particle = null; } this._shuriKenParticle3D = null; this._shur...
来源: Laya3.0_文档 发布时间: 20251010
...; }; //彻底销毁清理一个粒子特效对象 Clean(): void { if (this.destroyed) { return; } this.Recover(); if (this._particle && !this._particle.destroyed) { this._particle.removeSelf(); this._particle.destroy(true); this._particle = null; } this._shuriKenParticle3D = null; this._shur...
来源: Laya3.0_文档 发布时间: 20250104
...命期一般都会比较长。如果窗口不再使用,需要手动调用destroy。 Copyright ©Layabox 2025 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 16:27:59 img{cursor:pointer}
来源: Laya3.0_文档 发布时间: 20251010
...用优化 4.1 销毁地图 当Tiled Map不再使用的时候,需要使用destroy()方法进行销毁,回收被占用的内存。 例如: this.tMap.destroy(); 4.2 缓存相关 4.2.1 开启和关闭自动缓存 LayaAir引擎使用TiledMap时,默认会将没有动画的地块自动缓存起来...
来源: Laya3.0_文档 发布时间: 20251010
...景 Laya.Scene.close("scene/Login.ls") //销毁指定的场景 Laya.Scene.destroy("scene/Login.ls") 8.2 场景资源加载 示例代码如下: //用Laya.Scene3D的方式加载 Laya.Scene3D.load('scene/Game.ls', Laya.Handler.create(null, function (res:any){ Laya.stage.addChild(res); })); //用Laya....
来源: Laya3.0_文档 发布时间: 20251010
...些初始化的操作,如获取组件引用、设置初始状态等。onDestroy方法在游戏对象被销毁时调用,可在此方法中释放游戏对象所占用的资源,如内存、纹理等,以避免内存泄漏和资源浪费。通过合理利用这些生命周期方法,开发者能...
来源: Laya3.0_文档 发布时间: 20251010
...ar sp:Laya.Sprite = new Laya.Sprite(); //将sp内部引用设置为null sp.destroy(); 当对象设置为null,不会立即将其从内存中删除。只有系统认为内存足够低时,垃圾回收器才会运行。内存分配(而不是对象删除)会触发垃圾回收。 垃圾回收期...
来源: Laya3.0_文档 发布时间: 20251010