计轴区段

This commit is contained in:
xzb 2023-10-31 17:39:11 +08:00
parent a83a28832f
commit aee9a659ba

View File

@ -150,9 +150,9 @@ func handlerSectionState(w ecs.World, uid string) *state.SectionState {
//fmt.Printf("id=%s的信号机不存在", uid)
return nil
}
if entry.HasComponent(component.AxleSectionTag) { //计轴区段
if entry.HasComponent(component.AxleSectionType) { //计轴区段
sectionState := &state.SectionState{}
axleState := component.AxleSectionStateType.Get(entry)
axleState := component.AxleSectionType.Get(entry)
sectionState.Occupied = axleState.Occ
sectionState.Type = state.SectionType_Axle
return sectionState