package singleton import ( "joylink.club/ecs" "joylink.club/rtsssimulation/modelrepo" ) var WorldRepoType = ecs.NewComponentType[WorldRepo]() type WorldRepo struct { r modelrepo.Repo } func loadWorldRepo(w ecs.World, r modelrepo.Repo) { entry := w.Entry(w.Create(WorldRepoType)) WorldRepoType.Set(entry, &WorldRepo{ r: r, }) }