Skip to content

EditorKinds beta ​

Class of @v12-engine/editor

ts
export declare class EditorKinds

The kinds of thing of a game's own an editor has (editor.kinds): declared with it, and added and taken away in code

Members ​

constructor ​

ts
constructor(changed?: (kind: MapKindDef, there: boolean) => void);

Constructs a new instance of the EditorKinds class

add ​

ts
add(kind: MapKindDef): () => void;

Adds a kind: its tool, its group of the Hierarchy and the rest come with it. One of the same id takes its place. Gives back what takes it away

get ​

ts
get(id: string): MapKindDef | undefined;

The kind of thing of that id, or undefined when there is none

list ​

ts
list(): readonly MapKindDef[];

Every kind there is, in the order they were added

remove ​

ts
remove(id: string): void;

Takes a kind away from the editor. Its things stay in the map, which keeps what it does not know