fea: 添加设置功能
This commit is contained in:
1 parent
22157d4baa
commit
ada64fe4be
8 files changed
+405
-4
No files matched your search
@@ -9,6 +9,7 @@ import { Save } from './save.js';
|
||||
import { Touch } from './touch.js';
|
||||
import { sfx, unlockAudio, Audio2 } from './audio.js';
|
||||
import { Editor } from './editor.js';
|
||||
import { Settings } from './settings.js';
|
||||
import { clamp } from './util.js';
|
||||
|
||||
const W = 800, H = 608;
|
||||
@@ -298,6 +299,9 @@ UI.init({
|
||||
manage: () => UI.setManage(!UI.manage),
|
||||
help: () => UI.show('scr-help'),
|
||||
editor: toEditor,
|
||||
settings: () => { Settings.enter(); UI.show('scr-settings'); },
|
||||
'set-ok': () => Settings.confirm(),
|
||||
'set-reset': () => Settings.reset(),
|
||||
back: toTitle,
|
||||
resume,
|
||||
restart: () => { restart(); },
|
||||
@@ -321,6 +325,7 @@ addEventListener('keydown', unlock);
|
||||
|
||||
// 移动端虚拟手柄
|
||||
Touch.init({ pause, suicide, shoot });
|
||||
Settings.init();
|
||||
|
||||
UI.show('scr-title');
|
||||
requestAnimationFrame(loop);
|
||||
|
||||
Reference in new issue
Block a user