更新文档

This commit is contained in:
YHH
2025-10-11 10:48:24 +08:00
parent 62f895efe0
commit 66aa9f4f20
3 changed files with 44 additions and 10 deletions

View File

@@ -314,8 +314,8 @@ import { Core, WorldManager } from '@esengine/ecs-framework';
// 初始化Core
Core.create({ debug: true });
// 创建世界管理器(手动管理
const worldManager = new WorldManager();
// 从服务容器获取 WorldManagerCore 已自动创建并注册
const worldManager = Core.services.resolve(WorldManager);
// 创建多个独立的游戏世界
const room1 = worldManager.createWorld('room_001');