rts-sim-module/entity/loader.go
walker 7751d9d926 组件定义调整
道岔命名调整,道岔实体构建重构
2024-01-02 18:22:28 +08:00

28 lines
569 B
Go

package entity
import (
"joylink.club/ecs"
"joylink.club/rtsssimulation/component/singleton"
"joylink.club/rtsssimulation/modelrepo"
"joylink.club/rtsssimulation/modelrepo/model"
)
// 加载城轨仿真实体
func Loading(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, points []model.Points) {
for _, p := range points {
switch p.GetTractionType() {
case model.PTT_ZDJ9_2:
}
}
}