MCPcopy Create free account
hub / github.com/esengine/esengine / onAdded

Method onAdded

packages/core/src/ECS/Systems/HierarchySystem.ts:532–537  ·  view source on GitHub ↗

* 当实体被添加到系统时,将其加入脏集合 * When entity is added to system, add it to dirty set

(entity: Entity)

Source from the content-addressed store, hash-verified

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 * 当实体被移除时清理层级关系

Callers 2

initializeFunction · 0.45

Calls 2

getComponentMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected