道岔测试
This commit is contained in:
parent
355a9c86ff
commit
f91a8bca38
@ -4,7 +4,6 @@ import (
|
||||
"github.com/yohamta/donburi/filter"
|
||||
"joylink.club/ecs"
|
||||
sysEvent "joylink.club/rtsssimulation/system/event"
|
||||
"log"
|
||||
)
|
||||
|
||||
// RelayState 继电器有两个线圈1-2,3-4
|
||||
@ -58,7 +57,7 @@ func RelayAddListeners(w ecs.World) {
|
||||
|
||||
// RelayNeedChangeEventProcessor 继电器须要改变事件处理
|
||||
var RelayNeedChangeEventProcessor = func(w ecs.World, event sysEvent.RelayNeedChangeEvent) {
|
||||
log.Println("==>>收到继电器须改变事件:id = ", event.Id, " xh = ", event.Xh)
|
||||
//log.Println("==>>收到继电器须改变事件:id = ", event.Id, " xh = ", event.Xh)
|
||||
relayEntry := FindEntityById(w, event.Id)
|
||||
relayState := RelayStateComponent.Get(relayEntry)
|
||||
relayState.needXh = event.Xh
|
||||
|
@ -2,8 +2,6 @@ package system
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/yohamta/donburi/filter"
|
||||
"joylink.club/ecs"
|
||||
sysEvent "joylink.club/rtsssimulation/system/event"
|
||||
@ -294,7 +292,7 @@ func Switch2jzdj9AddListeners(w ecs.World) {
|
||||
|
||||
// Switch2jzdj9RelayActionEventProcessor 接收继电器动作事件
|
||||
var Switch2jzdj9RelayActionEventProcessor = func(w ecs.World, event sysEvent.RelayActionEvent) {
|
||||
log.Println("==>>收到继电器动作事件:id = ", event.Id, " xh = ", event.Xh)
|
||||
//log.Println("==>>收到继电器动作事件:id = ", event.Id, " xh = ", event.Xh)
|
||||
zdj9Query.Each(w, func(e *ecs.Entry) {
|
||||
switchModel := FindModelStorage(w).FindById(EntityIdentityComponent.Get(e).Id)
|
||||
roler, ok := switchModel.(IRelayCRole)
|
||||
|
Loading…
Reference in New Issue
Block a user