解决代码冲突

This commit is contained in:
joylink_zhangsai 2024-01-10 14:17:11 +08:00
parent ef48c7ba0b
commit 0316b398d5

View File

@ -3,7 +3,7 @@ package entity
import ( import (
"joylink.club/ecs" "joylink.club/ecs"
"joylink.club/rtsssimulation/component" "joylink.club/rtsssimulation/component"
"joylink.club/rtsssimulation/component/component_proto" "joylink.club/rtsssimulation/component/component_data"
"joylink.club/rtsssimulation/repository" "joylink.club/rtsssimulation/repository"
"joylink.club/rtsssimulation/repository/model/proto" "joylink.club/rtsssimulation/repository/model/proto"
) )
@ -11,7 +11,7 @@ import (
// LoadBalises 加载应答器实体 // LoadBalises 加载应答器实体
func LoadBalises(w ecs.World) error { func LoadBalises(w ecs.World) error {
data := GetWorldData(w) data := GetWorldData(w)
balises := data.Repo.TransponderList() balises := data.Repo.ResponderList()
for _, b := range balises { for _, b := range balises {
be := newBaliseEntity(w, b, data) be := newBaliseEntity(w, b, data)
switch b.TransponderType() { switch b.TransponderType() {
@ -36,7 +36,7 @@ func newBaliseEntity(w ecs.World, td *repository.Transponder, worldData *compone
entry = w.Entry(w.Create(component.UidType, component.BaliseStateType, component.LinkPositionType, component.KmType)) entry = w.Entry(w.Create(component.UidType, component.BaliseStateType, component.LinkPositionType, component.KmType))
component.UidType.SetValue(entry, component.Uid{Id: uid}) component.UidType.SetValue(entry, component.Uid{Id: uid})
component.BaliseStateType.Set(entry, &component.BaliseState{}) component.BaliseStateType.Set(entry, &component.BaliseState{})
component.LinkPositionType.SetValue(entry, component_proto.LinkPosition{ component.LinkPositionType.SetValue(entry, component_data.LinkPosition{
LinkId: td.LinkPosition().Link().Id(), LinkId: td.LinkPosition().Link().Id(),
Offset: td.LinkPosition().Offset(), Offset: td.LinkPosition().Offset(),
}) })