Documentation
¶
Overview ¶
Package mapeditor implements the Linefire stage (phase) editor: a top-down 2D world editor for walls, the player start, enemy/power-up spawns and trigger zones. It shares editorkit (camera, grid, history) and render (vector + glow) with the asset editor.
Index ¶
- type MapEditor
- func (e *MapEditor) Draw(screen *ebiten.Image)
- func (e *MapEditor) Layout(outsideWidth, outsideHeight int) (int, int)
- func (e *MapEditor) Persist()
- func (e *MapEditor) ReloadPalette()
- func (e *MapEditor) ResetTitle()
- func (e *MapEditor) SetOnOpenAsset(fn func(path string))
- func (e *MapEditor) SetOnOpenMap(fn func(path string))
- func (e *MapEditor) Update() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapEditor ¶
type MapEditor struct {
// contains filtered or unexported fields
}
MapEditor is the ebiten.Game for stage editing.
func New ¶
New creates a map editor for the given level. savePath is the file used when saving; assetDir is scanned for placeable spawn assets.
func (*MapEditor) Persist ¶
func (e *MapEditor) Persist()
Persist writes any unsaved changes now, e.g. before the host switches to a different map or asset.
func (*MapEditor) ReloadPalette ¶
func (e *MapEditor) ReloadPalette()
ReloadPalette rescans the asset/map directory, e.g. after returning from the asset editor or creating a new asset.
func (*MapEditor) ResetTitle ¶
func (e *MapEditor) ResetTitle()
ResetTitle forces the next updateTitle to push to the window, used when the host re-activates this editor after another mode changed the window title.
func (*MapEditor) SetOnOpenAsset ¶
SetOnOpenAsset wires the host callback that opens an asset file for editing in the same window. Called by the editapp host; nil means standalone (no-op).
func (*MapEditor) SetOnOpenMap ¶
SetOnOpenMap wires the host callback that opens a different map for editing.