大约有 5 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0033 秒)
...景的管理一、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
...; }; //彻底销毁清理一个粒子特效对象 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
...ar sp:Laya.Sprite = new Laya.Sprite(); //将sp内部引用设置为null sp.destroy(); 当对象设置为null,不会立即将其从内存中删除。只有系统认为内存足够低时,垃圾回收器才会运行。内存分配(而不是对象删除)会触发垃圾回收。 垃圾回收期...
来源: Laya3.0_文档 发布时间: 20251010
...些初始化的操作,如获取组件引用、设置初始状态等。onDestroy方法在游戏对象被销毁时调用,可在此方法中释放游戏对象所占用的资源,如内存、纹理等,以避免内存泄漏和资源浪费。通过合理利用这些生命周期方法,开发者能...
来源: Laya3.0_文档 发布时间: 20251010