rts-sim-module/system/dubug_system.go

24 lines
453 B
Go
Raw Normal View History

2023-09-15 10:13:25 +08:00
package system
import (
"fmt"
"joylink.club/ecs"
"log"
)
type DebugSystem struct {
}
func NewDebugSystem() *DebugSystem {
return &DebugSystem{}
}
// Update world 执行
func (debug *DebugSystem) Update(w ecs.World) {
zdj9Query.Each(w, func(entry *ecs.Entry) {
swId := EntityIdentityComponent.Get(entry).Id
swState := Switch2jZdj9StateComponent.Get(entry)
log.Println(fmt.Sprintf("==>>2JZDJ9=%s j1-2DQJ=%t", swId, swState.J1_2DQJ))
})
}