@esengine/ecs-framework 2.4.2 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @esengine/ecs-framework v2.4.2
2
+ * @esengine/ecs-framework v2.4.3
3
3
  * TypeScript definitions
4
4
  */
5
5
  /**
@@ -11544,7 +11544,7 @@ declare class SceneManager implements IService {
11544
11544
  * @zh 全局系统是在World级别运行的系统,不依赖特定Scene
11545
11545
  * @en Global systems run at World level and don't depend on specific Scene
11546
11546
  */
11547
- type IGlobalSystem = {
11547
+ interface IGlobalSystem {
11548
11548
  /**
11549
11549
  * @zh 系统名称
11550
11550
  * @en System name
@@ -11570,12 +11570,12 @@ type IGlobalSystem = {
11570
11570
  * @en Destroy system
11571
11571
  */
11572
11572
  destroy?(): void;
11573
- };
11573
+ }
11574
11574
  /**
11575
11575
  * @zh World配置接口
11576
11576
  * @en World configuration interface
11577
11577
  */
11578
- type IWorldConfig = {
11578
+ interface IWorldConfig {
11579
11579
  /**
11580
11580
  * @zh World名称
11581
11581
  * @en World name
@@ -11599,11 +11599,10 @@ type IWorldConfig = {
11599
11599
  /**
11600
11600
  * @zh 自动清理阈值(毫秒),空Scene超过此时间后将被自动清理
11601
11601
  * @en Auto cleanup threshold (ms), empty scenes exceeding this time will be auto-cleaned
11602
- *
11603
11602
  * @default 300000 (5 minutes)
11604
11603
  */
11605
11604
  cleanupThresholdMs?: number;
11606
- };
11605
+ }
11607
11606
  /**
11608
11607
  * @zh World类 - ECS世界管理器
11609
11608
  * @en World class - ECS world manager
@@ -11622,32 +11621,14 @@ type IWorldConfig = {
11622
11621
  * - World.services: World-level services (independent per World)
11623
11622
  * - Scene.services: Scene-level services (independent per Scene)
11624
11623
  *
11625
- * @zh 这种设计允许创建独立的游戏世界,如:
11626
- * - 游戏房间(每个房间一个World)
11627
- * - 不同的游戏模式
11628
- * - 独立的模拟环境
11629
- * @en This design allows creating independent game worlds like:
11630
- * - Game rooms (one World per room)
11631
- * - Different game modes
11632
- * - Independent simulation environments
11633
- *
11634
11624
  * @example
11635
11625
  * ```typescript
11636
- * // @zh 创建游戏房间的World | @en Create World for game room
11637
11626
  * const roomWorld = new World({ name: 'Room_001' });
11638
- *
11639
- * // @zh 注册World级别的服务 | @en Register World-level service
11640
11627
  * roomWorld.services.registerSingleton(RoomManager);
11641
11628
  *
11642
- * // @zh 在World中创建Scene | @en Create Scene in World
11643
- * const gameScene = roomWorld.createScene('game', new Scene());
11644
- * const uiScene = roomWorld.createScene('ui', new Scene());
11645
- *
11646
- * // @zh 在Scene中使用World级别的服务 | @en Use World-level service in Scene
11647
- * const roomManager = roomWorld.services.resolve(RoomManager);
11648
- *
11649
- * // @zh 更新整个World | @en Update entire World
11650
- * roomWorld.update(deltaTime);
11629
+ * const gameScene = roomWorld.createScene('game');
11630
+ * roomWorld.setSceneActive('game', true);
11631
+ * roomWorld.start();
11651
11632
  * ```
11652
11633
  */
11653
11634
  declare class World {
@@ -11657,14 +11638,29 @@ declare class World {
11657
11638
  private readonly _activeScenes;
11658
11639
  private readonly _globalSystems;
11659
11640
  private readonly _services;
11641
+ private readonly _createdAt;
11660
11642
  private _isActive;
11661
- private _createdAt;
11662
11643
  constructor(config?: IWorldConfig);
11663
11644
  /**
11664
- * @zh World级别的服务容器,用于管理World范围内的全局服务
11665
- * @en World-level service container for managing World-scoped global services
11645
+ * @zh World级别的服务容器
11646
+ * @en World-level service container
11666
11647
  */
11667
11648
  get services(): ServiceContainer;
11649
+ /**
11650
+ * @zh 检查World是否激活
11651
+ * @en Check if World is active
11652
+ */
11653
+ get isActive(): boolean;
11654
+ /**
11655
+ * @zh 获取Scene数量
11656
+ * @en Get scene count
11657
+ */
11658
+ get sceneCount(): number;
11659
+ /**
11660
+ * @zh 获取创建时间
11661
+ * @en Get creation time
11662
+ */
11663
+ get createdAt(): number;
11668
11664
  /**
11669
11665
  * @zh 创建并添加Scene到World
11670
11666
  * @en Create and add Scene to World
@@ -11672,6 +11668,7 @@ declare class World {
11672
11668
  * @param sceneName - @zh Scene名称 @en Scene name
11673
11669
  * @param sceneInstance - @zh Scene实例(可选)@en Scene instance (optional)
11674
11670
  * @returns @zh 创建的Scene实例 @en Created Scene instance
11671
+ * @throws @zh 名称为空、重复或超出限制时抛出错误 @en Throws if name is empty, duplicate, or limit exceeded
11675
11672
  */
11676
11673
  createScene<T extends IScene>(sceneName: string, sceneInstance?: T): T;
11677
11674
  /**
@@ -11682,6 +11679,11 @@ declare class World {
11682
11679
  * @returns @zh 是否成功移除 @en Whether removal was successful
11683
11680
  */
11684
11681
  removeScene(sceneName: string): boolean;
11682
+ /**
11683
+ * @zh 移除所有Scene
11684
+ * @en Remove all Scenes
11685
+ */
11686
+ removeAllScenes(): void;
11685
11687
  /**
11686
11688
  * @zh 获取Scene
11687
11689
  * @en Get Scene
@@ -11691,70 +11693,87 @@ declare class World {
11691
11693
  */
11692
11694
  getScene<T extends IScene>(sceneName: string): T | null;
11693
11695
  /**
11694
- * 获取所有Scene ID
11696
+ * @zh 获取所有Scene ID
11697
+ * @en Get all Scene IDs
11695
11698
  */
11696
11699
  getSceneIds(): string[];
11697
11700
  /**
11698
- * 获取所有Scene
11701
+ * @zh 获取所有Scene
11702
+ * @en Get all Scenes
11699
11703
  */
11700
11704
  getAllScenes(): IScene[];
11701
11705
  /**
11702
- * 移除所有Scene
11703
- */
11704
- removeAllScenes(): void;
11705
- /**
11706
- * 设置Scene激活状态
11706
+ * @zh 设置Scene激活状态
11707
+ * @en Set Scene active state
11708
+ *
11709
+ * @param sceneName - @zh Scene名称 @en Scene name
11710
+ * @param active - @zh 是否激活 @en Whether to activate
11707
11711
  */
11708
11712
  setSceneActive(sceneName: string, active: boolean): void;
11709
11713
  /**
11710
- * 检查Scene是否激活
11714
+ * @zh 检查Scene是否激活
11715
+ * @en Check if Scene is active
11711
11716
  */
11712
11717
  isSceneActive(sceneName: string): boolean;
11713
11718
  /**
11714
- * 获取活跃Scene数量
11719
+ * @zh 获取活跃Scene数量
11720
+ * @en Get active Scene count
11715
11721
  */
11716
11722
  getActiveSceneCount(): number;
11717
11723
  /**
11718
- * 添加全局System
11719
- * 全局System会在所有激活Scene之前更新
11724
+ * @zh 添加全局System
11725
+ * @en Add global System
11726
+ *
11727
+ * @param system - @zh 全局System实例 @en Global System instance
11728
+ * @returns @zh 添加的System实例 @en Added System instance
11720
11729
  */
11721
11730
  addGlobalSystem<T extends IGlobalSystem>(system: T): T;
11722
11731
  /**
11723
- * 移除全局System
11732
+ * @zh 移除全局System
11733
+ * @en Remove global System
11734
+ *
11735
+ * @param system - @zh 要移除的System @en System to remove
11736
+ * @returns @zh 是否成功移除 @en Whether removal was successful
11724
11737
  */
11725
11738
  removeGlobalSystem(system: IGlobalSystem): boolean;
11726
11739
  /**
11727
- * 获取全局System
11740
+ * @zh 获取全局System
11741
+ * @en Get global System
11742
+ *
11743
+ * @param type - @zh System类型 @en System type
11744
+ * @returns @zh System实例或null @en System instance or null
11728
11745
  */
11729
- getGlobalSystem<T extends IGlobalSystem>(type: new (...args: any[]) => T): T | null;
11746
+ getGlobalSystem<T extends IGlobalSystem>(type: new (...args: unknown[]) => T): T | null;
11730
11747
  /**
11731
- * 启动World
11748
+ * @zh 启动World
11749
+ * @en Start World
11732
11750
  */
11733
11751
  start(): void;
11734
11752
  /**
11735
- * 停止World
11753
+ * @zh 停止World
11754
+ * @en Stop World
11736
11755
  */
11737
11756
  stop(): void;
11757
+ /**
11758
+ * @zh 销毁World
11759
+ * @en Destroy World
11760
+ */
11761
+ destroy(): void;
11738
11762
  /**
11739
11763
  * @zh 更新World中的全局System
11740
11764
  * @en Update global systems in World
11741
- *
11742
- * @internal Called by Core.update()
11765
+ * @internal
11743
11766
  */
11744
11767
  updateGlobalSystems(): void;
11745
11768
  /**
11746
11769
  * @zh 更新World中的所有激活Scene
11747
11770
  * @en Update all active scenes in World
11748
- *
11749
- * @internal Called by Core.update()
11771
+ * @internal
11750
11772
  */
11751
11773
  updateScenes(): void;
11752
11774
  /**
11753
- * 销毁World
11754
- */
11755
- destroy(): void;
11756
- /**
11757
- * 获取World状态
11775
+ * @zh 获取World状态
11776
+ * @en Get World status
11758
11777
  */
11759
11778
  getStatus(): {
11760
11779
  name: string;
@@ -11764,42 +11783,21 @@ declare class World {
11764
11783
  globalSystemCount: number;
11765
11784
  createdAt: number;
11766
11785
  config: {
11767
- /**
11768
- * @zh World名称
11769
- * @en World name
11770
- */
11771
- name?: string;
11772
- /**
11773
- * @zh 是否启用调试模式
11774
- * @en Enable debug mode
11775
- */
11776
- debug?: boolean;
11777
- /**
11778
- * @zh 最大Scene数量限制
11779
- * @en Maximum number of scenes
11780
- */
11781
- maxScenes?: number;
11782
- /**
11783
- * @zh 是否自动清理空Scene
11784
- * @en Auto cleanup empty scenes
11785
- */
11786
- autoCleanup?: boolean;
11787
- /**
11788
- * @zh 自动清理阈值(毫秒),空Scene超过此时间后将被自动清理
11789
- * @en Auto cleanup threshold (ms), empty scenes exceeding this time will be auto-cleaned
11790
- *
11791
- * @default 300000 (5 minutes)
11792
- */
11793
- cleanupThresholdMs?: number;
11786
+ name: string;
11787
+ debug: boolean;
11788
+ maxScenes: number;
11789
+ autoCleanup: boolean;
11790
+ cleanupThresholdMs: number;
11794
11791
  };
11795
11792
  scenes: {
11796
11793
  id: string;
11797
- isActive: boolean;
11798
11794
  name: string;
11795
+ isActive: boolean;
11799
11796
  }[];
11800
11797
  };
11801
11798
  /**
11802
- * 获取World统计信息
11799
+ * @zh 获取World统计信息
11800
+ * @en Get World statistics
11803
11801
  */
11804
11802
  getStats(): {
11805
11803
  totalEntities: number;
@@ -11810,82 +11808,72 @@ declare class World {
11810
11808
  maxUpdateTime: number;
11811
11809
  };
11812
11810
  };
11811
+ /**
11812
+ * @zh 验证Scene名称
11813
+ * @en Validate Scene name
11814
+ */
11815
+ private validateSceneName;
11813
11816
  /**
11814
11817
  * @zh 检查Scene是否可以被自动清理
11815
11818
  * @en Check if a scene is eligible for auto cleanup
11816
11819
  */
11817
- private _isSceneCleanupCandidate;
11820
+ private isCleanupCandidate;
11818
11821
  /**
11819
11822
  * @zh 执行自动清理操作
11820
11823
  * @en Execute auto cleanup operation
11821
11824
  */
11822
11825
  private cleanup;
11823
- /**
11824
- * 检查World是否激活
11825
- */
11826
- get isActive(): boolean;
11827
- /**
11828
- * 获取Scene数量
11829
- */
11830
- get sceneCount(): number;
11831
- /**
11832
- * 获取创建时间
11833
- */
11834
- get createdAt(): number;
11835
11826
  }
11836
11827
 
11837
11828
  /**
11838
- * WorldManager配置接口
11829
+ * @zh WorldManager配置接口
11830
+ * @en WorldManager configuration interface
11839
11831
  */
11840
- type IWorldManagerConfig = {
11832
+ interface IWorldManagerConfig {
11841
11833
  /**
11842
- * 最大World数量
11834
+ * @zh 最大World数量
11835
+ * @en Maximum number of worlds
11843
11836
  */
11844
11837
  maxWorlds?: number;
11845
11838
  /**
11846
- * 是否自动清理空World
11839
+ * @zh 是否自动清理空World
11840
+ * @en Auto cleanup empty worlds
11847
11841
  */
11848
11842
  autoCleanup?: boolean;
11849
11843
  /**
11850
- * 清理间隔(帧数)
11844
+ * @zh 清理间隔(帧数)
11845
+ * @en Cleanup interval in frames
11851
11846
  */
11852
11847
  cleanupFrameInterval?: number;
11853
11848
  /**
11854
- * 是否启用调试模式
11849
+ * @zh 是否启用调试模式
11850
+ * @en Enable debug mode
11855
11851
  */
11856
11852
  debug?: boolean;
11857
- };
11853
+ }
11858
11854
  /**
11859
- * World管理器 - 管理所有World实例
11855
+ * @zh World管理器 - 管理所有World实例
11856
+ * @en World Manager - Manages all World instances
11860
11857
  *
11861
- * WorldManager负责管理多个独立的World实例。
11858
+ * @zh WorldManager负责管理多个独立的World实例。
11862
11859
  * 每个World都是独立的ECS环境,可以包含多个Scene。
11860
+ * @en WorldManager is responsible for managing multiple independent World instances.
11861
+ * Each World is an isolated ECS environment that can contain multiple Scenes.
11863
11862
  *
11864
- * 适用场景:
11863
+ * @zh 适用场景:
11865
11864
  * - MMO游戏的多房间管理
11866
11865
  * - 服务器端的多游戏实例
11867
11866
  * - 需要完全隔离的多个游戏环境
11867
+ * @en Use cases:
11868
+ * - Multi-room management for MMO games
11869
+ * - Multiple game instances on server-side
11870
+ * - Completely isolated game environments
11868
11871
  *
11869
11872
  * @example
11870
11873
  * ```typescript
11871
- * // 创建WorldManager实例
11872
- * const worldManager = new WorldManager({
11873
- * maxWorlds: 100,
11874
- * autoCleanup: true
11875
- * });
11876
- *
11877
- * // 创建游戏房间World
11878
- * const room1 = worldManager.createWorld('room_001', {
11879
- * name: 'GameRoom_001',
11880
- * maxScenes: 5
11881
- * });
11882
- * room1.setActive(true);
11883
- *
11884
- * // 游戏循环
11885
- * function gameLoop(deltaTime: number) {
11886
- * Core.update(deltaTime);
11887
- * worldManager.updateAll(); // 更新所有活跃World
11888
- * }
11874
+ * const worldManager = new WorldManager({ maxWorlds: 100 });
11875
+ * const room = worldManager.createWorld('room_001');
11876
+ * worldManager.setWorldActive('room_001', true);
11889
11877
  * ```
11890
11878
  */
11891
11879
  declare class WorldManager implements IService {
@@ -11895,70 +11883,124 @@ declare class WorldManager implements IService {
11895
11883
  private _framesSinceCleanup;
11896
11884
  constructor(config?: IWorldManagerConfig);
11897
11885
  /**
11898
- * 创建新World
11886
+ * @zh 获取World总数
11887
+ * @en Get total world count
11888
+ */
11889
+ get worldCount(): number;
11890
+ /**
11891
+ * @zh 获取激活World数量
11892
+ * @en Get active world count
11893
+ */
11894
+ get activeWorldCount(): number;
11895
+ /**
11896
+ * @zh 检查是否正在运行
11897
+ * @en Check if running
11898
+ */
11899
+ get isRunning(): boolean;
11900
+ /**
11901
+ * @zh 获取配置
11902
+ * @en Get configuration
11903
+ */
11904
+ get config(): IWorldManagerConfig;
11905
+ /**
11906
+ * @zh 创建新World
11907
+ * @en Create new World
11908
+ *
11909
+ * @param worldName - @zh World名称 @en World name
11910
+ * @param config - @zh World配置 @en World configuration
11911
+ * @returns @zh 创建的World实例 @en Created World instance
11912
+ * @throws @zh 名称为空、重复或超出限制时抛出错误 @en Throws if name is empty, duplicate, or limit exceeded
11899
11913
  */
11900
11914
  createWorld(worldName: string, config?: IWorldConfig): World;
11901
11915
  /**
11902
- * 移除World
11916
+ * @zh 移除World
11917
+ * @en Remove World
11918
+ *
11919
+ * @param worldName - @zh World名称 @en World name
11920
+ * @returns @zh 是否成功移除 @en Whether removal was successful
11903
11921
  */
11904
11922
  removeWorld(worldName: string): boolean;
11905
11923
  /**
11906
- * 获取World
11924
+ * @zh 获取World
11925
+ * @en Get World
11926
+ *
11927
+ * @param worldName - @zh World名称 @en World name
11928
+ * @returns @zh World实例或null @en World instance or null
11907
11929
  */
11908
11930
  getWorld(worldName: string): World | null;
11909
11931
  /**
11910
- * 获取所有World ID
11932
+ * @zh 获取所有World ID
11933
+ * @en Get all World IDs
11911
11934
  */
11912
11935
  getWorldIds(): string[];
11913
11936
  /**
11914
- * 获取所有World
11937
+ * @zh 获取所有World
11938
+ * @en Get all Worlds
11915
11939
  */
11916
11940
  getAllWorlds(): World[];
11917
11941
  /**
11918
- * 设置World激活状态
11942
+ * @zh 设置World激活状态
11943
+ * @en Set World active state
11944
+ *
11945
+ * @param worldName - @zh World名称 @en World name
11946
+ * @param active - @zh 是否激活 @en Whether to activate
11919
11947
  */
11920
11948
  setWorldActive(worldName: string, active: boolean): void;
11921
11949
  /**
11922
- * 检查World是否激活
11950
+ * @zh 检查World是否激活
11951
+ * @en Check if World is active
11923
11952
  */
11924
11953
  isWorldActive(worldName: string): boolean;
11925
11954
  /**
11926
- * 更新所有活跃的World
11927
- *
11928
- * 应该在每帧的游戏循环中调用。
11929
- * 会自动更新所有活跃World的全局系统和场景。
11955
+ * @zh 获取所有激活的World
11956
+ * @en Get all active Worlds
11957
+ */
11958
+ getActiveWorlds(): World[];
11959
+ /**
11960
+ * @zh 查找满足条件的World
11961
+ * @en Find Worlds matching predicate
11930
11962
  *
11931
- * @example
11932
- * ```typescript
11933
- * function gameLoop(deltaTime: number) {
11934
- * Core.update(deltaTime); // 更新全局服务
11935
- * worldManager.updateAll(); // 更新所有World
11936
- * }
11937
- * ```
11963
+ * @param predicate - @zh 过滤条件 @en Filter predicate
11938
11964
  */
11939
- updateAll(): void;
11965
+ findWorlds(predicate: (world: World) => boolean): World[];
11940
11966
  /**
11941
- * 获取所有激活的World
11967
+ * @zh 根据名称查找World
11968
+ * @en Find World by name
11969
+ *
11970
+ * @param name - @zh World名称 @en World name
11942
11971
  */
11943
- getActiveWorlds(): World[];
11972
+ findWorldByName(name: string): World | null;
11944
11973
  /**
11945
- * 启动所有World
11974
+ * @zh 启动所有World
11975
+ * @en Start all Worlds
11946
11976
  */
11947
11977
  startAll(): void;
11948
11978
  /**
11949
- * 停止所有World
11979
+ * @zh 停止所有World
11980
+ * @en Stop all Worlds
11950
11981
  */
11951
11982
  stopAll(): void;
11952
11983
  /**
11953
- * 查找满足条件的World
11984
+ * @zh 销毁WorldManager
11985
+ * @en Destroy WorldManager
11954
11986
  */
11955
- findWorlds(predicate: (world: World) => boolean): World[];
11987
+ destroy(): void;
11956
11988
  /**
11957
- * 根据名称查找World
11989
+ * @zh 实现 IService 接口的 dispose 方法
11990
+ * @en Implement IService dispose method
11958
11991
  */
11959
- findWorldByName(name: string): World | null;
11992
+ dispose(): void;
11993
+ /**
11994
+ * @zh 更新所有活跃的World
11995
+ * @en Update all active Worlds
11996
+ *
11997
+ * @zh 应该在每帧的游戏循环中调用
11998
+ * @en Should be called in each frame of game loop
11999
+ */
12000
+ updateAll(): void;
11960
12001
  /**
11961
- * 获取WorldManager统计信息
12002
+ * @zh 获取WorldManager统计信息
12003
+ * @en Get WorldManager statistics
11962
12004
  */
11963
12005
  getStats(): {
11964
12006
  totalWorlds: number;
@@ -11974,35 +12016,24 @@ declare class WorldManager implements IService {
11974
12016
  cleanupFrameInterval: number;
11975
12017
  debug: boolean;
11976
12018
  };
11977
- worlds: any[];
12019
+ worlds: {
12020
+ id: string;
12021
+ name: string;
12022
+ isActive: boolean;
12023
+ sceneCount: number;
12024
+ totalEntities: number;
12025
+ totalSystems: number;
12026
+ }[];
11978
12027
  };
11979
12028
  /**
11980
- * 获取详细状态信息
12029
+ * @zh 获取详细状态信息
12030
+ * @en Get detailed status information
11981
12031
  */
11982
12032
  getDetailedStatus(): {
11983
12033
  worlds: {
11984
12034
  id: string;
11985
12035
  isActive: boolean;
11986
- status: {
11987
- name: string;
11988
- isActive: boolean;
11989
- sceneCount: number;
11990
- activeSceneCount: number;
11991
- globalSystemCount: number;
11992
- createdAt: number;
11993
- config: {
11994
- name?: string;
11995
- debug?: boolean;
11996
- maxScenes?: number;
11997
- autoCleanup?: boolean;
11998
- cleanupThresholdMs?: number;
11999
- };
12000
- scenes: {
12001
- id: string;
12002
- isActive: boolean;
12003
- name: string;
12004
- }[];
12005
- };
12036
+ status: ReturnType<World["getStatus"]>;
12006
12037
  }[];
12007
12038
  totalWorlds: number;
12008
12039
  activeWorlds: number;
@@ -12019,42 +12050,30 @@ declare class WorldManager implements IService {
12019
12050
  };
12020
12051
  };
12021
12052
  /**
12022
- * 清理空World
12053
+ * @zh 清理空World
12054
+ * @en Cleanup empty Worlds
12055
+ *
12056
+ * @returns @zh 清理的World数量 @en Number of cleaned up Worlds
12023
12057
  */
12024
12058
  cleanup(): number;
12025
12059
  /**
12026
- * 销毁WorldManager
12027
- */
12028
- destroy(): void;
12029
- /**
12030
- * 实现 IService 接口的 dispose 方法
12031
- * 调用 destroy 方法进行清理
12032
- */
12033
- dispose(): void;
12034
- /**
12035
- * 判断World是否应该被清理
12036
- * 清理策略:
12037
- * 1. World未激活
12038
- * 2. 没有Scene或所有Scene都是空的
12039
- * 3. 创建时间超过10分钟
12040
- */
12041
- private shouldCleanupWorld;
12042
- /**
12043
- * 获取World总数
12044
- */
12045
- get worldCount(): number;
12046
- /**
12047
- * 获取激活World数量
12060
+ * @zh 验证World名称
12061
+ * @en Validate World name
12048
12062
  */
12049
- get activeWorldCount(): number;
12063
+ private validateWorldName;
12050
12064
  /**
12051
- * 检查是否正在运行
12065
+ * @zh 处理自动清理
12066
+ * @en Process auto cleanup
12052
12067
  */
12053
- get isRunning(): boolean;
12068
+ private processAutoCleanup;
12054
12069
  /**
12055
- * 获取配置
12070
+ * @zh 判断World是否应该被清理
12071
+ * @en Check if World should be cleaned up
12072
+ *
12073
+ * @zh 清理策略:未激活 + (无Scene或全空Scene) + 创建超过10分钟
12074
+ * @en Cleanup policy: inactive + (no scenes or all empty) + created over 10 minutes ago
12056
12075
  */
12057
- get config(): IWorldManagerConfig;
12076
+ private isCleanupCandidate;
12058
12077
  }
12059
12078
 
12060
12079
  /**