2023-12-28 16:49:28 +08:00
|
|
|
package entity
|
|
|
|
|
|
|
|
import (
|
|
|
|
"joylink.club/ecs"
|
|
|
|
"joylink.club/rtsssimulation/component/singleton"
|
|
|
|
"joylink.club/rtsssimulation/modelrepo"
|
|
|
|
"joylink.club/rtsssimulation/modelrepo/model"
|
|
|
|
)
|
|
|
|
|
|
|
|
// 加载城轨仿真实体
|
2023-12-29 17:48:57 +08:00
|
|
|
func Loading(w ecs.World, repo modelrepo.Repo) error {
|
2023-12-28 16:49:28 +08:00
|
|
|
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")
|
|
|
|
}
|