EditorEvents beta
Interface of @v12-engine/editor
export interface EditorEventsThe events of the editor's bus by name, each with what it comes with: the editor's own, and a game's. A game adds its own by declaration merging, so emit and on know them:
declare module '@v12-engine/editor' {
interface EditorEvents {
'td.wave.picked': { wave: number }
}
}The editor's own: selection (what is selected, as the things themselves), map.changed (which parts, from the step of the history that changed them), tool (the tool picked), file.opened and file.saved, undo and redo (the step), play.started and play.stopped (the game), play.tick (a few times a second, only while something listens), panel.opened and panel.closed (its id)
Members
"file.opened"
'file.opened': MapFileEvent;A map file was opened
"file.saved"
'file.saved': MapFileEvent;A map file was saved
"map.changed"
'map.changed': MapChange;A change was made to the map, with the change's details
"panel.closed"
'panel.closed': PanelEvent;A panel was closed
"panel.opened"
'panel.opened': PanelEvent;A panel was opened
"play.started"
'play.started': GameClient;A test play started, with its game
"play.stopped"
'play.stopped': GameClient;A test play ended, with its game
"play.tick"
'play.tick': PlayTick;A tick of the test play was stepped
"prefab.placed"
'prefab.placed': PrefabEvent;A prefab was placed in the map
"prefab.updated"
'prefab.updated': PrefabEvent;A placed prefab was updated from its file
redo
redo: Operation;An operation was redone, with the operation
selection
selection: EditorSelected;The selection after it changed
tool
tool: EditorTool;The tool the editor now holds
undo
undo: Operation;An operation was undone, with the operation