CollectionWriter beta
Interface of @v12-engine/editor
ts
export interface CollectionWriterHow the things of a kind are written: put down as a copy (a place moved to where it goes), changed, taken away. The editor's own kinds each by its methods, which check and record what they do; a game's kind as its things
Members
add
ts
add(copied: {
id: number;
}, place: <T extends Vec2>(at: T) => T): number | undefined;Puts down a copy of one where place takes its places, a name of its own where the copied one's is taken: its new id, or nothing where it did not fit
remove
ts
remove(ids: Iterable<number>): void;Takes some away, as a part of a step
set
ts
set(id: number, change: object): void;Changes one, as a part of a step