import { Entity, System } from '@lastolivegames/becsy'; import { Resource } from '../Resource'; export interface Command { apply(system: System): void; } interface WithEntity { cmd: C; id: Entity; } /** * A [`Command`] which gets executed for a given [`Entity`]. * * @example * class CountName implements EntityCommand { * apply(id: Entity) { * } * } * * commands.spawn_empty().add(CountName); */ export interface EntityCommand extends Command { with_entity(id: Entity): WithEntity; } /** * A [`Command`] that inserts a [`Resource`] into the world. */ export declare class InsertResource implements Command { resource: Resource; constructor(resource: Resource); apply(): void; } export declare class RemoveResource implements Command { resource: Resource; constructor(resource: Resource); apply(): void; } export {};