(entities: readonly Entity[])
| 996 | super(Matcher.all(CComponent)); |
| 997 | } |
| 998 | protected override process(entities: readonly Entity[]): void { |
| 999 | for (const entity of entities) { |
| 1000 | const c = entity.getComponent(CComponent); |
| 1001 | if (c) { |
| 1002 | const a = this.scene!.findEntityById(c.aId); |
| 1003 | if (a && !a.hasComponent(DComponent)) { |
| 1004 | console.log('CSystem: Adding D to Entity A'); |
| 1005 | a.addComponent(new DComponent()); |
| 1006 | } |
| 1007 | const b = this.scene!.findEntityById(c.bId); |
| 1008 | if (b && !b.hasComponent(DComponent)) { |
| 1009 | console.log('CSystem: Adding D to Entity B'); |
| 1010 | b.addComponent(new DComponent()); |
| 1011 | } |
| 1012 | } |
| 1013 | } |
| 1014 | } |
| 1015 | } |
| 1016 | |
| 1017 | // DSystem: 在 lateProcess 中移除 D 组件 |
nothing calls this directly
no test coverage detected