20 lines
713 B
TypeScript
20 lines
713 B
TypeScript
|
import { BaseComponent, Component } from './component';
|
||
|
export declare class BaseEntity {
|
||
|
id: number;
|
||
|
components: Map<number, BaseComponent>;
|
||
|
constructor();
|
||
|
addComponent(component: Component): void;
|
||
|
removeComponent(component: BaseComponent): void;
|
||
|
getComponentIDs(): number[];
|
||
|
getComponent(component: BaseComponent): BaseComponent;
|
||
|
getComponentByID(id: number): BaseComponent;
|
||
|
}
|
||
|
export interface Entity {
|
||
|
new (): BaseComponent;
|
||
|
addComponent(component: Component): any;
|
||
|
removeComponent(component: BaseComponent): any;
|
||
|
getComponentIDs(): number[];
|
||
|
getComponent(component: BaseComponent): any;
|
||
|
getComponentByID(id: number): BaseComponent;
|
||
|
}
|