* 当实体被添加到系统时,将其加入脏集合 * When entity is added to system, add it to dirty set
(entity: Entity)
| 530 | * When entity is added to system, add it to dirty set |
| 531 | */ |
| 532 | protected override onAdded(entity: Entity): void { |
| 533 | const hierarchy = entity.getComponent(HierarchyComponent); |
| 534 | if (hierarchy && hierarchy.bCacheDirty) { |
| 535 | this.dirtyEntities.add(entity); |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | /** |
| 540 | * 当实体被移除时清理层级关系 |
no test coverage detected