道岔测试
This commit is contained in:
parent
747c9a2347
commit
cd1ee45866
@ -34,7 +34,8 @@ func main() {
|
||||
//
|
||||
time.Sleep(2 * time.Second)
|
||||
//
|
||||
testPsdOpt(world)
|
||||
//testPsdOpt(world)
|
||||
testSwitchTurn(world)
|
||||
//
|
||||
time.Sleep(120 * time.Second)
|
||||
}
|
||||
|
@ -19,9 +19,8 @@ func NewDebugSystem() *DebugSystem {
|
||||
// world 执行
|
||||
func (me *DebugSystem) Update(w ecs.World) {
|
||||
//debugMovableDevice(w)
|
||||
debugPsd(w)
|
||||
|
||||
//debugSwitch(w)
|
||||
//debugPsd(w)
|
||||
debugSwitch(w)
|
||||
//debugSignal(w)
|
||||
//debugTowPosButton(w)
|
||||
}
|
||||
|
@ -27,7 +27,8 @@ const (
|
||||
func (me *PercentageDeviceSystem) Update(world ecs.World) {
|
||||
me.query.Each(world, func(e *ecs.Entry) {
|
||||
percentage := components.PercentageDeviceStateComponent.Get(e)
|
||||
if percentage.Rate != percentage.Target {
|
||||
movable := components.MovableDeviceStateComponent.Get(e)
|
||||
if percentage.Rate != percentage.Target || movable.Speed > 0 {
|
||||
movable := components.MovableDeviceStateComponent.Get(e)
|
||||
if movable.ToH {
|
||||
if movable.Position >= percentage.Target {
|
||||
|
Loading…
Reference in New Issue
Block a user