rts-sim-module/system/switch_system.go
2023-08-18 11:23:52 +08:00

38 lines
669 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package system
import (
"joylink.club/ecs"
)
// 道岔系统操作
type SwitchSystem struct {
}
func NewSwitchSystem() *SwitchSystem {
return &SwitchSystem{}
}
// 触发道岔正常转动
// w: 当前世界
// switchId: 道岔id
// turnNormal: true-道岔转动到定位false-道岔转动到反位
func FireSwitchTurn(w ecs.World, switchId string, turnNormal bool) bool {
return true
}
// world 执行
func (me *SwitchSystem) Update(w ecs.World) {
}
// 获取道岔转动耗时ms
func getSwitchTurnTime(switchId string) int64 {
return 5000
}
// 获取道岔定操反操继电器耗时ms
func getSwitchNRDelayTime(switchId string) int64 {
return 2000
}