feat(core): 支持通过 Core.create() 配置 WorldManager 参数

This commit is contained in:
LING YE
2025-10-18 13:10:09 +08:00
parent a801e4f50e
commit 7f56ebc786
2 changed files with 5 additions and 1 deletions

View File

@@ -191,7 +191,7 @@ export class Core {
});
// 初始化World管理器
this._worldManager = new WorldManager();
this._worldManager = new WorldManager(this._config.worldManagerConfig);
this._serviceContainer.registerInstance(WorldManager, this._worldManager);
// 初始化插件管理器

View File

@@ -2,6 +2,8 @@
* 框架核心类型定义
*/
import type { IWorldManagerConfig } from '../ECS';
// 导出TypeScript类型增强工具
export * from './TypeHelpers';
export * from './IUpdatable';
@@ -264,6 +266,8 @@ export interface ICoreConfig {
enableEntitySystems?: boolean;
/** 调试配置 */
debugConfig?: IECSDebugConfig;
/** WorldManager配置 */
worldManagerConfig?: IWorldManagerConfig;
}
/**