assassin-bug/framework/world/ecs-world.d.ts

25 lines
945 B
TypeScript
Raw Normal View History

2022-11-26 01:22:02 +00:00
import { World } from '../ecs/index';
import { Game } from '../game';
import { Component } from '../ecs/component';
import { System } from '../ecs/system';
import { BaseEntity, Entity } from '../ecs/entity';
import { Query } from '../ecs/query';
import { World as IWorld } from '.';
export declare class ECSWorld implements IWorld {
instance: Game;
id: string;
world: World;
running: boolean;
constructor(instance: Game);
update(): void;
updateDraw(): boolean;
createEntity(components: Array<Component>): BaseEntity;
createComponent(props: any): Component;
createSystem(systemExecutor: Function): void;
addSystem(system: System): void;
addEntity(entity: BaseEntity): void;
removeEntity(entity: BaseEntity): void;
createQuery(include: Array<Component>, exclude: Array<Component>): Query;
extendEntity(entity: Entity, components: Array<Component>): BaseEntity;
}