@esengine/ecs-framework 2.2.0 → 2.2.2

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.
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @esengine/ecs-framework v2.2.0
2
+ * @esengine/ecs-framework v2.2.2
3
3
  * TypeScript definitions
4
4
  */
5
5
  /**
@@ -4466,17 +4466,17 @@ declare class SceneSerializer {
4466
4466
  *
4467
4467
  * @param scene 要序列化的场景
4468
4468
  * @param options 序列化选项
4469
- * @returns 序列化后的数据(JSON字符串或二进制Buffer
4469
+ * @returns 序列化后的数据(JSON字符串或二进制Uint8Array
4470
4470
  */
4471
- static serialize(scene: IScene, options?: SceneSerializationOptions): string | Buffer;
4471
+ static serialize(scene: IScene, options?: SceneSerializationOptions): string | Uint8Array;
4472
4472
  /**
4473
4473
  * 反序列化场景
4474
4474
  *
4475
4475
  * @param scene 目标场景
4476
- * @param saveData 序列化的数据(JSON字符串或二进制Buffer
4476
+ * @param saveData 序列化的数据(JSON字符串或二进制Uint8Array
4477
4477
  * @param options 反序列化选项
4478
4478
  */
4479
- static deserialize(scene: IScene, saveData: string | Buffer, options?: SceneDeserializationOptions): void;
4479
+ static deserialize(scene: IScene, saveData: string | Uint8Array, options?: SceneDeserializationOptions): void;
4480
4480
  /**
4481
4481
  * 序列化场景自定义数据
4482
4482
  *
@@ -4729,7 +4729,7 @@ declare class IncrementalSerializer {
4729
4729
  *
4730
4730
  * @param incremental 增量快照
4731
4731
  * @param options 序列化选项
4732
- * @returns 序列化后的数据(JSON字符串或二进制Buffer
4732
+ * @returns 序列化后的数据(JSON字符串或二进制Uint8Array
4733
4733
  *
4734
4734
  * @example
4735
4735
  * ```typescript
@@ -4751,11 +4751,11 @@ declare class IncrementalSerializer {
4751
4751
  static serializeIncremental(incremental: IncrementalSnapshot, options?: {
4752
4752
  format?: IncrementalSerializationFormat;
4753
4753
  pretty?: boolean;
4754
- }): string | Buffer;
4754
+ }): string | Uint8Array;
4755
4755
  /**
4756
4756
  * 反序列化增量快照
4757
4757
  *
4758
- * @param data 序列化的数据(JSON字符串或二进制Buffer
4758
+ * @param data 序列化的数据(JSON字符串或二进制Uint8Array
4759
4759
  * @returns 增量快照
4760
4760
  *
4761
4761
  * @example
@@ -4767,7 +4767,7 @@ declare class IncrementalSerializer {
4767
4767
  * const snapshot = IncrementalSerializer.deserializeIncremental(buffer);
4768
4768
  * ```
4769
4769
  */
4770
- static deserializeIncremental(data: string | Buffer): IncrementalSnapshot;
4770
+ static deserializeIncremental(data: string | Uint8Array): IncrementalSnapshot;
4771
4771
  /**
4772
4772
  * 计算增量快照的大小(字节)
4773
4773
  *
@@ -5195,10 +5195,10 @@ declare class Scene implements IScene {
5195
5195
  /**
5196
5196
  * 序列化场景
5197
5197
  *
5198
- * 将场景及其所有实体、组件序列化为JSON字符串或二进制Buffer
5198
+ * 将场景及其所有实体、组件序列化为JSON字符串或二进制Uint8Array
5199
5199
  *
5200
5200
  * @param options 序列化选项
5201
- * @returns 序列化后的数据(JSON字符串或二进制Buffer
5201
+ * @returns 序列化后的数据(JSON字符串或二进制Uint8Array
5202
5202
  *
5203
5203
  * @example
5204
5204
  * ```typescript
@@ -5214,13 +5214,13 @@ declare class Scene implements IScene {
5214
5214
  * });
5215
5215
  * ```
5216
5216
  */
5217
- serialize(options?: SceneSerializationOptions): string | Buffer;
5217
+ serialize(options?: SceneSerializationOptions): string | Uint8Array;
5218
5218
  /**
5219
5219
  * 反序列化场景
5220
5220
  *
5221
5221
  * 从序列化数据恢复场景状态
5222
5222
  *
5223
- * @param saveData 序列化的数据(JSON字符串或二进制Buffer
5223
+ * @param saveData 序列化的数据(JSON字符串或二进制Uint8Array
5224
5224
  * @param options 反序列化选项
5225
5225
  *
5226
5226
  * @example
@@ -5236,7 +5236,7 @@ declare class Scene implements IScene {
5236
5236
  * });
5237
5237
  * ```
5238
5238
  */
5239
- deserialize(saveData: string | Buffer, options?: SceneDeserializationOptions): void;
5239
+ deserialize(saveData: string | Uint8Array, options?: SceneDeserializationOptions): void;
5240
5240
  /** 增量序列化的基础快照 */
5241
5241
  private _incrementalBaseSnapshot?;
5242
5242
  /**
@@ -5288,7 +5288,7 @@ declare class Scene implements IScene {
5288
5288
  /**
5289
5289
  * 应用增量变更到场景
5290
5290
  *
5291
- * @param incremental 增量快照数据(IncrementalSnapshot对象、JSON字符串或二进制Buffer
5291
+ * @param incremental 增量快照数据(IncrementalSnapshot对象、JSON字符串或二进制Uint8Array
5292
5292
  * @param componentRegistry 组件类型注册表(可选,默认使用全局注册表)
5293
5293
  *
5294
5294
  * @example
@@ -5300,12 +5300,12 @@ declare class Scene implements IScene {
5300
5300
  * const jsonData = IncrementalSerializer.serializeIncremental(snapshot, { format: 'json' });
5301
5301
  * scene.applyIncremental(jsonData);
5302
5302
  *
5303
- * // 从二进制Buffer应用
5303
+ * // 从二进制Uint8Array应用
5304
5304
  * const binaryData = IncrementalSerializer.serializeIncremental(snapshot, { format: 'binary' });
5305
5305
  * scene.applyIncremental(binaryData);
5306
5306
  * ```
5307
5307
  */
5308
- applyIncremental(incremental: IncrementalSnapshot | string | Buffer, componentRegistry?: Map<string, any>): void;
5308
+ applyIncremental(incremental: IncrementalSnapshot | string | Uint8Array, componentRegistry?: Map<string, any>): void;
5309
5309
  /**
5310
5310
  * 更新增量快照基准
5311
5311
  *
@@ -7417,168 +7417,6 @@ declare class ECSFluentAPI {
7417
7417
  */
7418
7418
  declare function createECSAPI(scene: IScene, querySystem: QuerySystem, eventSystem: TypeSafeEventSystem): ECSFluentAPI;
7419
7419
 
7420
- /**
7421
- * 单场景管理器
7422
- *
7423
- * 适用场景:
7424
- * - 单人游戏
7425
- * - 简单场景切换
7426
- * - 不需要多World隔离的项目
7427
- *
7428
- * 特点:
7429
- * - 轻量级,零额外开销
7430
- * - 简单直观的API
7431
- * - 支持延迟场景切换
7432
- * - 自动管理ECS API
7433
- *
7434
- * @example
7435
- * ```typescript
7436
- * // 初始化Core
7437
- * Core.create({ debug: true });
7438
- *
7439
- * // 创建场景管理器
7440
- * const sceneManager = new SceneManager();
7441
- *
7442
- * // 设置场景
7443
- * class GameScene extends Scene {
7444
- * initialize() {
7445
- * const player = this.createEntity('Player');
7446
- * player.addComponent(new Transform(100, 100));
7447
- * }
7448
- * }
7449
- *
7450
- * sceneManager.setScene(new GameScene());
7451
- *
7452
- * // 游戏循环
7453
- * function gameLoop(deltaTime: number) {
7454
- * Core.update(deltaTime); // 更新全局服务
7455
- * sceneManager.update(); // 更新场景
7456
- * }
7457
- *
7458
- * // 延迟切换场景(下一帧生效)
7459
- * sceneManager.loadScene(new MenuScene());
7460
- * ```
7461
- */
7462
- declare class SceneManager implements IService {
7463
- /**
7464
- * 当前活跃场景
7465
- */
7466
- private _currentScene;
7467
- /**
7468
- * 待切换的下一个场景(延迟切换用)
7469
- */
7470
- private _nextScene;
7471
- /**
7472
- * ECS流式API
7473
- */
7474
- private _ecsAPI;
7475
- /**
7476
- * 日志器
7477
- */
7478
- private _logger;
7479
- /**
7480
- * 设置当前场景(立即切换)
7481
- *
7482
- * 会自动处理旧场景的结束和新场景的初始化。
7483
- *
7484
- * @param scene - 要设置的场景实例
7485
- * @returns 返回设置的场景实例,便于链式调用
7486
- *
7487
- * @example
7488
- * ```typescript
7489
- * const gameScene = sceneManager.setScene(new GameScene());
7490
- * console.log(gameScene.name); // 可以立即使用返回的场景
7491
- * ```
7492
- */
7493
- setScene<T extends IScene>(scene: T): T;
7494
- /**
7495
- * 延迟加载场景(下一帧切换)
7496
- *
7497
- * 场景不会立即切换,而是在下一次调用 update() 时切换。
7498
- * 这对于避免在当前帧的中途切换场景很有用。
7499
- *
7500
- * @param scene - 要加载的场景实例
7501
- *
7502
- * @example
7503
- * ```typescript
7504
- * // 在某个System中触发场景切换
7505
- * class GameOverSystem extends EntitySystem {
7506
- * process(entities: readonly Entity[]) {
7507
- * if (playerHealth <= 0) {
7508
- * sceneManager.loadScene(new GameOverScene());
7509
- * // 当前帧继续执行,场景将在下一帧切换
7510
- * }
7511
- * }
7512
- * }
7513
- * ```
7514
- */
7515
- loadScene<T extends IScene>(scene: T): void;
7516
- /**
7517
- * 获取当前活跃的场景
7518
- *
7519
- * @returns 当前场景实例,如果没有场景则返回null
7520
- */
7521
- get currentScene(): IScene | null;
7522
- /**
7523
- * 获取ECS流式API
7524
- *
7525
- * 提供便捷的实体查询、事件发射等功能。
7526
- *
7527
- * @returns ECS API实例,如果当前没有场景则返回null
7528
- *
7529
- * @example
7530
- * ```typescript
7531
- * const api = sceneManager.api;
7532
- * if (api) {
7533
- * // 查询所有敌人
7534
- * const enemies = api.find(Enemy, Transform);
7535
- *
7536
- * // 发射事件
7537
- * api.emit('game:start', { level: 1 });
7538
- * }
7539
- * ```
7540
- */
7541
- get api(): ECSFluentAPI | null;
7542
- /**
7543
- * 更新场景
7544
- *
7545
- * 应该在每帧的游戏循环中调用。
7546
- * 会自动处理延迟场景切换。
7547
- *
7548
- * @example
7549
- * ```typescript
7550
- * function gameLoop(deltaTime: number) {
7551
- * Core.update(deltaTime);
7552
- * sceneManager.update(); // 每帧调用
7553
- * }
7554
- * ```
7555
- */
7556
- update(): void;
7557
- /**
7558
- * 销毁场景管理器
7559
- *
7560
- * 会自动结束当前场景并清理所有资源。
7561
- * 通常在应用程序关闭时调用。
7562
- */
7563
- destroy(): void;
7564
- /**
7565
- * 检查是否有活跃场景
7566
- *
7567
- * @returns 如果有活跃场景返回true,否则返回false
7568
- */
7569
- get hasScene(): boolean;
7570
- /**
7571
- * 检查是否有待切换的场景
7572
- *
7573
- * @returns 如果有待切换场景返回true,否则返回false
7574
- */
7575
- get hasPendingScene(): boolean;
7576
- /**
7577
- * 释放资源(IService接口)
7578
- */
7579
- dispose(): void;
7580
- }
7581
-
7582
7420
  /**
7583
7421
  * 全局系统接口
7584
7422
  * 全局系统是在World级别运行的系统,不依赖特定Scene
@@ -7677,6 +7515,10 @@ declare class World {
7677
7515
  * 获取所有Scene
7678
7516
  */
7679
7517
  getAllScenes(): IScene[];
7518
+ /**
7519
+ * 移除所有Scene
7520
+ */
7521
+ removeAllScenes(): void;
7680
7522
  /**
7681
7523
  * 设置Scene激活状态
7682
7524
  */
@@ -7812,6 +7654,12 @@ interface IWorldManagerConfig {
7812
7654
  * 是否启用调试模式
7813
7655
  */
7814
7656
  debug?: boolean;
7657
+ /**
7658
+ * 是否创建默认World(默认true)
7659
+ *
7660
+ * 当通过Core使用时应该为true,直接使用WorldManager时可设为false
7661
+ */
7662
+ createDefaultWorld?: boolean;
7815
7663
  }
7816
7664
  /**
7817
7665
  * World管理器 - 管理所有World实例
@@ -7841,24 +7689,38 @@ interface IWorldManagerConfig {
7841
7689
  *
7842
7690
  * // 游戏循环
7843
7691
  * function gameLoop(deltaTime: number) {
7844
- * Core.update(deltaTime);
7845
- * worldManager.updateAll(); // 更新所有活跃World
7692
+ * Core.update(deltaTime); // 自动更新所有@Updatable服务(包括WorldManager)
7846
7693
  * }
7847
7694
  * ```
7848
7695
  */
7849
- declare class WorldManager {
7696
+ declare class WorldManager implements IService, IUpdatable {
7697
+ /**
7698
+ * 默认World的ID
7699
+ */
7700
+ static readonly DEFAULT_WORLD_ID = "__default__";
7850
7701
  private readonly _config;
7851
7702
  private readonly _worlds;
7852
7703
  private readonly _activeWorlds;
7853
7704
  private _cleanupTimer;
7854
7705
  private _isRunning;
7855
7706
  constructor(config?: IWorldManagerConfig);
7707
+ /**
7708
+ * 获取默认World
7709
+ *
7710
+ * 默认World由WorldManager自动创建,供SceneManager使用。
7711
+ * 此方法主要供SceneManager内部使用。
7712
+ *
7713
+ * @returns 默认World实例
7714
+ */
7715
+ getDefaultWorld(): World;
7856
7716
  /**
7857
7717
  * 创建新World
7858
7718
  */
7859
7719
  createWorld(worldId: string, config?: IWorldConfig): World;
7860
7720
  /**
7861
7721
  * 移除World
7722
+ *
7723
+ * 注意:默认World不能被删除
7862
7724
  */
7863
7725
  removeWorld(worldId: string): boolean;
7864
7726
  /**
@@ -7884,18 +7746,12 @@ declare class WorldManager {
7884
7746
  /**
7885
7747
  * 更新所有活跃的World
7886
7748
  *
7887
- * 应该在每帧的游戏循环中调用。
7749
+ * 此方法由ServiceContainer自动调用(@Updatable装饰器)
7888
7750
  * 会自动更新所有活跃World的全局系统和场景。
7889
7751
  *
7890
- * @example
7891
- * ```typescript
7892
- * function gameLoop(deltaTime: number) {
7893
- * Core.update(deltaTime); // 更新全局服务
7894
- * worldManager.updateAll(); // 更新所有World
7895
- * }
7896
- * ```
7752
+ * @param deltaTime 帧时间间隔(未使用,保留用于接口兼容)
7897
7753
  */
7898
- updateAll(): void;
7754
+ update(deltaTime?: number): void;
7899
7755
  /**
7900
7756
  * 获取所有激活的World
7901
7757
  */
@@ -7944,6 +7800,12 @@ declare class WorldManager {
7944
7800
  * 是否启用调试模式
7945
7801
  */
7946
7802
  debug?: boolean;
7803
+ /**
7804
+ * 是否创建默认World(默认true)
7805
+ *
7806
+ * 当通过Core使用时应该为true,直接使用WorldManager时可设为false
7807
+ */
7808
+ createDefaultWorld?: boolean;
7947
7809
  };
7948
7810
  worlds: any[];
7949
7811
  };
@@ -7998,6 +7860,12 @@ declare class WorldManager {
7998
7860
  * 是否启用调试模式
7999
7861
  */
8000
7862
  debug?: boolean;
7863
+ /**
7864
+ * 是否创建默认World(默认true)
7865
+ *
7866
+ * 当通过Core使用时应该为true,直接使用WorldManager时可设为false
7867
+ */
7868
+ createDefaultWorld?: boolean;
8001
7869
  };
8002
7870
  };
8003
7871
  /**
@@ -8008,6 +7876,11 @@ declare class WorldManager {
8008
7876
  * 销毁WorldManager
8009
7877
  */
8010
7878
  destroy(): void;
7879
+ /**
7880
+ * 实现 IService 接口的 dispose 方法
7881
+ * 调用 destroy 方法进行清理
7882
+ */
7883
+ dispose(): void;
8011
7884
  /**
8012
7885
  * 启动清理定时器
8013
7886
  */
@@ -8038,6 +7911,188 @@ declare class WorldManager {
8038
7911
  get config(): IWorldManagerConfig;
8039
7912
  }
8040
7913
 
7914
+ /**
7915
+ * 单场景管理器
7916
+ *
7917
+ * 适用场景:
7918
+ * - 单人游戏
7919
+ * - 简单场景切换
7920
+ * - 不需要多World隔离的项目
7921
+ *
7922
+ * 特点:
7923
+ * - 轻量级,零额外开销
7924
+ * - 简单直观的API
7925
+ * - 支持延迟场景切换
7926
+ * - 自动管理ECS API
7927
+ * - 通过依赖注入获取WorldManager的默认World
7928
+ *
7929
+ * @example
7930
+ * ```typescript
7931
+ * // 初始化Core
7932
+ * Core.create({ debug: true });
7933
+ *
7934
+ * // 设置场景
7935
+ * class GameScene extends Scene {
7936
+ * initialize() {
7937
+ * const player = this.createEntity('Player');
7938
+ * player.addComponent(new Transform(100, 100));
7939
+ * }
7940
+ * }
7941
+ *
7942
+ * Core.setScene(new GameScene());
7943
+ *
7944
+ * // 游戏循环
7945
+ * function gameLoop(deltaTime: number) {
7946
+ * Core.update(deltaTime); // 自动更新所有服务(包括SceneManager)
7947
+ * }
7948
+ *
7949
+ * // 延迟切换场景(下一帧生效)
7950
+ * Core.loadScene(new MenuScene());
7951
+ * ```
7952
+ */
7953
+ declare class SceneManager implements IService, IUpdatable {
7954
+ /**
7955
+ * 内部默认World(从WorldManager获取)
7956
+ */
7957
+ private _defaultWorld;
7958
+ /**
7959
+ * 待切换的下一个场景(延迟切换用)
7960
+ */
7961
+ private _nextScene;
7962
+ /**
7963
+ * ECS流式API
7964
+ */
7965
+ private _ecsAPI;
7966
+ /**
7967
+ * 日志器
7968
+ */
7969
+ private _logger;
7970
+ /**
7971
+ * 场景切换回调函数
7972
+ */
7973
+ private _onSceneChangedCallback?;
7974
+ /**
7975
+ * 默认场景ID
7976
+ */
7977
+ private static readonly DEFAULT_SCENE_ID;
7978
+ /**
7979
+ * 构造函数
7980
+ *
7981
+ * WorldManager通过依赖注入自动传入
7982
+ *
7983
+ * @param worldManager WorldManager实例,用于获取默认World
7984
+ */
7985
+ constructor(worldManager: WorldManager);
7986
+ /**
7987
+ * 设置场景切换回调
7988
+ *
7989
+ * @param callback 场景切换时的回调函数
7990
+ * @internal
7991
+ */
7992
+ setSceneChangedCallback(callback: () => void): void;
7993
+ /**
7994
+ * 设置当前场景(立即切换)
7995
+ *
7996
+ * 会自动处理旧场景的结束和新场景的初始化。
7997
+ *
7998
+ * @param scene - 要设置的场景实例
7999
+ * @returns 返回设置的场景实例,便于链式调用
8000
+ *
8001
+ * @example
8002
+ * ```typescript
8003
+ * const gameScene = sceneManager.setScene(new GameScene());
8004
+ * console.log(gameScene.name); // 可以立即使用返回的场景
8005
+ * ```
8006
+ */
8007
+ setScene<T extends IScene>(scene: T): T;
8008
+ /**
8009
+ * 延迟加载场景(下一帧切换)
8010
+ *
8011
+ * 场景不会立即切换,而是在下一次调用 update() 时切换。
8012
+ * 这对于避免在当前帧的中途切换场景很有用。
8013
+ *
8014
+ * @param scene - 要加载的场景实例
8015
+ *
8016
+ * @example
8017
+ * ```typescript
8018
+ * // 在某个System中触发场景切换
8019
+ * class GameOverSystem extends EntitySystem {
8020
+ * process(entities: readonly Entity[]) {
8021
+ * if (playerHealth <= 0) {
8022
+ * sceneManager.loadScene(new GameOverScene());
8023
+ * // 当前帧继续执行,场景将在下一帧切换
8024
+ * }
8025
+ * }
8026
+ * }
8027
+ * ```
8028
+ */
8029
+ loadScene<T extends IScene>(scene: T): void;
8030
+ /**
8031
+ * 获取当前活跃的场景
8032
+ *
8033
+ * @returns 当前场景实例,如果没有场景则返回null
8034
+ */
8035
+ get currentScene(): IScene | null;
8036
+ /**
8037
+ * 获取ECS流式API
8038
+ *
8039
+ * 提供便捷的实体查询、事件发射等功能。
8040
+ *
8041
+ * @returns ECS API实例,如果当前没有场景则返回null
8042
+ *
8043
+ * @example
8044
+ * ```typescript
8045
+ * const api = sceneManager.api;
8046
+ * if (api) {
8047
+ * // 查询所有敌人
8048
+ * const enemies = api.find(Enemy, Transform);
8049
+ *
8050
+ * // 发射事件
8051
+ * api.emit('game:start', { level: 1 });
8052
+ * }
8053
+ * ```
8054
+ */
8055
+ get api(): ECSFluentAPI | null;
8056
+ /**
8057
+ * 更新场景
8058
+ *
8059
+ * 应该在每帧的游戏循环中调用。
8060
+ * 会自动处理延迟场景切换。
8061
+ *
8062
+ * @example
8063
+ * ```typescript
8064
+ * function gameLoop(deltaTime: number) {
8065
+ * Core.update(deltaTime);
8066
+ * sceneManager.update(); // 每帧调用
8067
+ * }
8068
+ * ```
8069
+ */
8070
+ update(): void;
8071
+ /**
8072
+ * 销毁场景管理器
8073
+ *
8074
+ * 会自动结束当前场景并清理所有资源。
8075
+ * 通常在应用程序关闭时调用。
8076
+ */
8077
+ destroy(): void;
8078
+ /**
8079
+ * 检查是否有活跃场景
8080
+ *
8081
+ * @returns 如果有活跃场景返回true,否则返回false
8082
+ */
8083
+ get hasScene(): boolean;
8084
+ /**
8085
+ * 检查是否有待切换的场景
8086
+ *
8087
+ * @returns 如果有待切换场景返回true,否则返回false
8088
+ */
8089
+ get hasPendingScene(): boolean;
8090
+ /**
8091
+ * 释放资源(IService接口)
8092
+ */
8093
+ dispose(): void;
8094
+ }
8095
+
8041
8096
  /**
8042
8097
  * 组件对象池,用于复用组件实例以减少内存分配
8043
8098
  */
@@ -9334,6 +9389,12 @@ declare class Core {
9334
9389
  * 管理当前场景的生命周期。
9335
9390
  */
9336
9391
  private _sceneManager;
9392
+ /**
9393
+ * World管理器
9394
+ *
9395
+ * 管理多个独立的World实例(可选)。
9396
+ */
9397
+ private _worldManager;
9337
9398
  /**
9338
9399
  * 插件管理器
9339
9400
  *
@@ -9374,6 +9435,24 @@ declare class Core {
9374
9435
  * ```
9375
9436
  */
9376
9437
  static get services(): ServiceContainer;
9438
+ /**
9439
+ * 获取World管理器
9440
+ *
9441
+ * 用于管理多个独立的World实例(高级用户)。
9442
+ *
9443
+ * @returns WorldManager实例
9444
+ * @throws 如果Core实例未创建
9445
+ *
9446
+ * @example
9447
+ * ```typescript
9448
+ * // 创建多个游戏房间
9449
+ * const wm = Core.worldManager;
9450
+ * const room1 = wm.createWorld('room_001');
9451
+ * room1.createScene('game', new GameScene());
9452
+ * room1.start();
9453
+ * ```
9454
+ */
9455
+ static get worldManager(): WorldManager;
9377
9456
  /**
9378
9457
  * 创建Core实例
9379
9458
  *