fi signal

This commit is contained in:
xzb 2023-10-09 17:58:29 +08:00
parent fccc6db9d0
commit 115241bfc7
7 changed files with 46 additions and 46 deletions

View File

@ -8,9 +8,9 @@ import (
// signal 2xh1 接口:点灯操作、开通列车信号、开通禁止信号
// Drive2XH1Dd 点灯操作
// DriveSignal2XH1Dd 点灯操作
// dd : true-物理点灯false-物理灭灯
func Drive2XH1Dd(w ecs.World, signalId string, dd bool) {
func DriveSignal2XH1Dd(w ecs.World, signalId string, dd bool) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -23,8 +23,8 @@ func Drive2XH1Dd(w ecs.World, signalId string, dd bool) {
})
}
// Drive2XH1Lx 开通列车信号(绿灯亮)
func Drive2XH1Lx(w ecs.World, signalId string) {
// DriveSignal2XH1Lx 开通列车信号(绿灯亮)
func DriveSignal2XH1Lx(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -37,8 +37,8 @@ func Drive2XH1Lx(w ecs.World, signalId string) {
})
}
// Drive2XH1Non 开通禁止信号(红灯亮)
func Drive2XH1Non(w ecs.World, signalId string) {
// DriveSignal2XH1Non 开通禁止信号(红灯亮)
func DriveSignal2XH1Non(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]

View File

@ -8,9 +8,9 @@ import (
// signal 3xh1 接口:点灯操作、开通列车信号、开通引导信号、开通禁止信号
// Drive3XH1Dd 点灯操作
// DriveSignal3XH1Dd 点灯操作
// dd : true-物理点灯false-物理灭灯
func Drive3XH1Dd(w ecs.World, signalId string, dd bool) {
func DriveSignal3XH1Dd(w ecs.World, signalId string, dd bool) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -24,9 +24,9 @@ func Drive3XH1Dd(w ecs.World, signalId string, dd bool) {
})
}
// Drive3XH1Lx 开通列车信号(直向通过则亮绿灯;侧向通过则亮黄灯)
// DriveSignal3XH1Lx 开通列车信号(直向通过则亮绿灯;侧向通过则亮黄灯)
// xz : true-直向通过false-侧向通过
func Drive3XH1Lx(w ecs.World, signalId string, zx bool) {
func DriveSignal3XH1Lx(w ecs.World, signalId string, zx bool) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -45,8 +45,8 @@ func Drive3XH1Lx(w ecs.World, signalId string, zx bool) {
})
}
// Drive3XH1Yx 开通引导信号(红灯亮且黄灯亮)
func Drive3XH1Yx(w ecs.World, signalId string) {
// DriveSignal3XH1Yx 开通引导信号(红灯亮且黄灯亮)
func DriveSignal3XH1Yx(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -65,8 +65,8 @@ func Drive3XH1Yx(w ecs.World, signalId string) {
})
}
// Drive3XH1Non 开通禁止信号(红灯亮)
func Drive3XH1Non(w ecs.World, signalId string) {
// DriveSignal3XH1Non 开通禁止信号(红灯亮)
func DriveSignal3XH1Non(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]

View File

@ -8,9 +8,9 @@ import (
// signal 3xh2 接口:点灯操作、开通列车信号、开通引导信号、开通禁止信号
// Drive3XH2Dd 点灯操作
// DriveSignal3XH2Dd 点灯操作
// dd : true-物理点灯false-物理灭灯
func Drive3XH2Dd(w ecs.World, signalId string, dd bool) {
func DriveSignal3XH2Dd(w ecs.World, signalId string, dd bool) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -24,8 +24,8 @@ func Drive3XH2Dd(w ecs.World, signalId string, dd bool) {
})
}
// Drive3XH2Lx 开通列车信号(绿灯亮)
func Drive3XH2Lx(w ecs.World, signalId string) {
// DriveSignal3XH2Lx 开通列车信号(绿灯亮)
func DriveSignal3XH2Lx(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -41,8 +41,8 @@ func Drive3XH2Lx(w ecs.World, signalId string) {
})
}
// Drive3XH2Yx 开通引导信号(黄灯亮且红灯亮)
func Drive3XH2Yx(w ecs.World, signalId string) {
// DriveSignal3XH2Yx 开通引导信号(黄灯亮且红灯亮)
func DriveSignal3XH2Yx(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -58,8 +58,8 @@ func Drive3XH2Yx(w ecs.World, signalId string) {
})
}
// Drive3XH2Non 开通禁止信号(红灯亮)
func Drive3XH2Non(w ecs.World, signalId string) {
// DriveSignal3XH2Non 开通禁止信号(红灯亮)
func DriveSignal3XH2Non(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]

View File

@ -8,9 +8,9 @@ import (
// signal 3xh3 接口:点灯操作、开通列车信号、开通引导信号、开通禁止信号
// Drive3XH3Dd 点灯操作
// DriveSignal3XH3Dd 点灯操作
// dd : true-物理点灯false-物理灭灯
func Drive3XH3Dd(w ecs.World, signalId string, dd bool) {
func DriveSignal3XH3Dd(w ecs.World, signalId string, dd bool) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -24,8 +24,8 @@ func Drive3XH3Dd(w ecs.World, signalId string, dd bool) {
})
}
// Drive3XH3Lx 开通列车信号(黄灯亮)
func Drive3XH3Lx(w ecs.World, signalId string) {
// DriveSignal3XH3Lx 开通列车信号(黄灯亮)
func DriveSignal3XH3Lx(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -41,8 +41,8 @@ func Drive3XH3Lx(w ecs.World, signalId string) {
})
}
// Drive3XH3Yx 开通引导信号(黄灯亮且红灯亮)
func Drive3XH3Yx(w ecs.World, signalId string) {
// DriveSignal3XH3Yx 开通引导信号(黄灯亮且红灯亮)
func DriveSignal3XH3Yx(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -58,8 +58,8 @@ func Drive3XH3Yx(w ecs.World, signalId string) {
})
}
// Drive3XH3Non 开通禁止信号(红灯亮)
func Drive3XH3Non(w ecs.World, signalId string) {
// DriveSignal3XH3Non 开通禁止信号(红灯亮)
func DriveSignal3XH3Non(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]

View File

@ -8,9 +8,9 @@ import (
// signal 3xh4 接口:点灯操作、开通列车信号、开通禁止信号
// Drive3XH4Dd 点灯操作
// DriveSignal3XH4Dd 点灯操作
// dd : true-物理点灯false-物理灭灯
func Drive3XH4Dd(w ecs.World, signalId string, dd bool) {
func DriveSignal3XH4Dd(w ecs.World, signalId string, dd bool) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -24,9 +24,9 @@ func Drive3XH4Dd(w ecs.World, signalId string, dd bool) {
})
}
// Drive3XH4Lx 开通列车信号(直向通过亮绿灯,侧向通过亮黄灯)
// DriveSignal3XH4Lx 开通列车信号(直向通过亮绿灯,侧向通过亮黄灯)
// zx : true-直向通过false-侧向通过
func Drive3XH4Lx(w ecs.World, signalId string, zx bool) {
func DriveSignal3XH4Lx(w ecs.World, signalId string, zx bool) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -42,8 +42,8 @@ func Drive3XH4Lx(w ecs.World, signalId string, zx bool) {
})
}
// Drive3XH4Non 开通禁止信号(亮红灯)
func Drive3XH4Non(w ecs.World, signalId string) {
// DriveSignal3XH4Non 开通禁止信号(亮红灯)
func DriveSignal3XH4Non(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]

View File

@ -8,8 +8,8 @@ import (
// signal dcxh 接口:开通调车信号、开通禁止信号
// DriveDCXHDx 开通调车信号(白灯亮)
func DriveDCXHDx(w ecs.World, signalId string) {
// DriveSignalDCXHDx 开通调车信号(白灯亮)
func DriveSignalDCXHDx(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -22,8 +22,8 @@ func DriveDCXHDx(w ecs.World, signalId string) {
})
}
// DriveDCXHNon 开通禁止信号(蓝灯亮)
func DriveDCXHNon(w ecs.World, signalId string) {
// DriveSignalDCXHNon 开通禁止信号(蓝灯亮)
func DriveSignalDCXHNon(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]

View File

@ -8,8 +8,8 @@ import (
// signal jckxh 接口:开通列车信号、开通调车信号、开通禁止信号
// DriveJCKXHLx 开通列车信号(黄灯亮)
func DriveJCKXHLx(w ecs.World, signalId string) {
// DriveSignalJCKXHLx 开通列车信号(黄灯亮)
func DriveSignalJCKXHLx(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -25,8 +25,8 @@ func DriveJCKXHLx(w ecs.World, signalId string) {
})
}
// DriveJCKXHDx 开通调车信号(白灯亮)
func DriveJCKXHDx(w ecs.World, signalId string) {
// DriveSignalJCKXHDx 开通调车信号(白灯亮)
func DriveSignalJCKXHDx(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]
@ -42,8 +42,8 @@ func DriveJCKXHDx(w ecs.World, signalId string) {
})
}
// DriveJCKXHNon 开通禁止信号(红灯亮)
func DriveJCKXHNon(w ecs.World, signalId string) {
// DriveSignalJCKXHNon 开通禁止信号(红灯亮)
func DriveSignalJCKXHNon(w ecs.World, signalId string) {
w.Execute(func() {
wd := entity.GetWorldData(w)
signalEntry, ok := wd.EntityMap[signalId]