屏蔽门

This commit is contained in:
xzb 2023-08-18 16:28:23 +08:00
parent 1119dd3ebf
commit f43b910599
2 changed files with 3 additions and 2 deletions

View File

@ -52,7 +52,7 @@ func testPsdCellOpt(world ecs.World, face *system.FaceSystem) {
face.Call(func(w ecs.World) any { face.Call(func(w ecs.World) any {
return system.FirePsdCellOperation(w, "psd1", "psd1Cell2", 0) return system.FirePsdCellOperation(w, "psd1", "psd1Cell2", 0)
}) })
time.Sleep(5 * time.Second) time.Sleep(10 * time.Second)
face.Call(func(w ecs.World) any { face.Call(func(w ecs.World) any {
return system.FirePsdCellOperation(w, "psd1", "psd1Cell1", 100-20) return system.FirePsdCellOperation(w, "psd1", "psd1Cell1", 100-20)
}) })
@ -106,5 +106,4 @@ func initSystems(world ecs.World) {
world.AddSystem(system.NewSwitchSystem()) world.AddSystem(system.NewSwitchSystem())
world.AddSystem(system.NewSignalSystem()) world.AddSystem(system.NewSignalSystem())
world.AddSystem(system.NewPsdSystem()) world.AddSystem(system.NewPsdSystem())
world.AddSystem(system.NewPercentageSystem())
} }

View File

@ -18,6 +18,8 @@ func InitializeWorld(w ecs.World, worldTime time.Time) *system.FaceSystem {
//初始化world与外界交互的门面 //初始化world与外界交互的门面
faceSystem := system.NewFaceSystem(w) faceSystem := system.NewFaceSystem(w)
w.AddSystem(faceSystem) w.AddSystem(faceSystem)
//添加百分比设备系统
w.AddSystem(system.NewPercentageSystem())
//添加调试系统 //添加调试系统
w.AddSystem(system.NewDebugSystem()) w.AddSystem(system.NewDebugSystem())
// //