@curbl/ecs
Version:
Small Entity Component System
21 lines (20 loc) • 552 B
TypeScript
/**
* interface used for internal component type
* that gets modified by the Component decorator
*/
export interface __Component extends Component {
constructor: {
__id: string;
__bit: number;
};
}
export interface Component {
/**
* asynchronous load method that gets called before adding the component to an entity
*/
load?(): Promise<void>;
/**
* asynchronous unload method that gets called before removing the component from an entity
*/
unload?(): Promise<void>;
}