feat(core): 支持通过 Core.create() 配置 WorldManager 参数
This commit is contained in:
@@ -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);
|
||||
|
||||
// 初始化插件管理器
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user