UNPKG

@curbl/ecs

Version:

Small Entity Component System

16 lines (15 loc) 503 B
import { Entity } from './entity'; export declare abstract class System { /** * called when the systems gets added to the ecs */ setUp(): void; /** * called when the system gets removed from the ecs */ tearDown(): void; onEntityAdded?(entity: Entity): void; onEntityRemoved?(entity: Entity): void; entities(): ReadonlyArray<Readonly<Entity>>; } export declare function injectSystem<T extends System>(system: T, updateMethods: string[]): T;