diff --git a/sys/circuit_sys/ckm.go b/sys/circuit_sys/ckm.go index 97582e1..a090675 100644 --- a/sys/circuit_sys/ckm.go +++ b/sys/circuit_sys/ckm.go @@ -22,6 +22,9 @@ func NewCkmSys() *CkmSys { func (p *CkmSys) Update(world ecs.World) { worldData := entity.GetWorldData(world) p.query.Each(world, func(entry *ecs.Entry) { + if !entry.HasComponent(component.CkmCircuitType) { + return + } posCom := component.FixedPositionTransformType.Get(entry) circuit := component.CkmCircuitType.Get(entry) //目前不考虑没有车库门电路的情况 //车库门PSL