# Interface IEntityEnterSystem<E>

监听组件首次添加到实体上时，在ComblockSystem上实现这个接口

1. entityEnter会在update方法之前执行，实体进入后，不会再次进入entityEnter方法中
2. 当实体从当前System移除，下次再次符合条件进入System也会执行上述流程

### Example

    export class RoleUpgradeSystem extends ecs.ComblockSystem implements ecs.IEntityEnterSystem {
       filter(): ecs.IMatcher {
           return ecs.allOf(RoleUpgradeComp, RoleModelLevelComp);
       }

       entityEnter(e: Role): void {
           e.remove(RoleUpgradeComp);
       }
    }

#### Type Parameters

- #### E extends ecs . Entity = ecs . Entity

#### Hierarchy

- IEntityEnterSystem

- Defined in assets/libs/ecs/ECS.ts:64

#####
Index

### Methods

entityEnter

## Methods

### entityEnter

- entityEnter(entity: E): void

- #### Parameters

  - ##### entity: E

  #### Returns void

  - Defined in assets/libs/ecs/ECS.ts:65

Generated using TypeDoc