rts-sim-module/entity/cg_load.go
walker c4bc8c640f 重构singleton组件及相关方法接口
调整repo目录结构和命名
初步开始重构仿真实体加载
2023-12-28 16:49:28 +08:00

23 lines
502 B
Go

package entity
import (
"joylink.club/ecs"
"joylink.club/rtsssimulation/component/singleton"
"joylink.club/rtsssimulation/modelrepo"
"joylink.club/rtsssimulation/modelrepo/model"
)
// 加载城轨仿真实体
func LoadCg(w ecs.World, repo modelrepo.Repo) error {
singleton.LoadSingletons(w, repo)
for _, s := range repo.GetEcses() {
// 加载道岔实体
loadTurnouts(w, s.GetTurnouts())
}
return nil
}
func loadTurnouts(w ecs.World, turnout []model.Turnout) {
panic("unimplemented")
}