fea: 添加地图管理

This commit is contained in:
cancerai committed 2026-10-22 23:16:27 +08:00
1 parent cc2883458c
commit 22157d4baa
7 files changed
+201 -44

No files matched your search

+8 -1
View File
@@ -169,7 +169,13 @@ function nextLevel() {
}
function toLevels() { G.state = 'menu'; UI.show('scr-levels'); Touch.hide(); }
function toTitle() { G.state = 'menu'; UI.show('scr-title'); Touch.hide(); }
function toEditor() { G.state = 'editor'; UI.show('scr-editor'); Touch.hide(); Editor.open(); }
function toEditor() {
G.state = 'editor';
UI.show('scr-editor');
Touch.hide();
// 试玩后返回:保留正在编辑的地图;从未进过编辑器时才新建
if (Editor.faces) Editor.show(); else Editor.open();
}
function pause() {
if (G.state !== 'playing') return;
G.state = 'paused';
@@ -289,6 +295,7 @@ Audio2.enabled = Save.data.audio !== false;
UI.init({
play: (lv) => { G.fromEditor = false; startLevel(lv, lv.builtin === false ? -1 : (lv.index ?? -1)); },
levels: toLevels,
manage: () => UI.setManage(!UI.manage),
help: () => UI.show('scr-help'),
editor: toEditor,
back: toTitle,