mirror of
https://github.com/kirikayakazuto/CocosCreator_ECS
synced 2025-01-14 06:51:55 +00:00
14 lines
487 B
TypeScript
Executable File
14 lines
487 B
TypeScript
Executable File
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;
|
|
} |