mirror of
https://github.com/kirikayakazuto/CocosCreator_ECS
synced 2025-01-14 23:11:46 +00:00
14 lines
487 B
TypeScript
14 lines
487 B
TypeScript
|
import { ECSWorld } from "./ECSWorld";
|
||
|
|
||
|
export abstract class ECSSystem {
|
||
|
/** 连接 */
|
||
|
public abstract onAdd(world: ECSWorld): void;
|
||
|
/** 断开连接 */
|
||
|
public abstract onRemove(world: ECSWorld): void;
|
||
|
/** 添加实体 */
|
||
|
public abstract onEntityEnter(world: ECSWorld, entity: number): void;
|
||
|
/** */
|
||
|
public abstract onEntityLeave(world: ECSWorld, entity: number): void;
|
||
|
/** 更新 */
|
||
|
public abstract onUpdate(world: ECSWorld, dt: number): void;
|
||
|
}
|