package simulation import ( "joylink.club/ecs" "joylink.club/rtsssimulation/entities" ) // 初始化仿真world func InitializeWorld(config *WorldConfig) ecs.World { world := ecs.NewWorld(config.Tick) // 初始化系统 for _, sys := range config.Systems { world.AddSystem(sys) } // 创建world时间实体 entities.CreateSystemTimerEntity(world, config.InitTime) // 创建world模型仓库实体 entities.CreateModelStorageEntity(world, config.ModelManager) // return world }