fea: 添加设置功能

This commit is contained in:
cancerai committed 2026-10-23 17:49:29 +08:00
1 parent 22157d4baa
commit ada64fe4be
8 files changed
+405 -4

No files matched your search

+2
View File
@@ -1,6 +1,7 @@
// 移动端虚拟手柄:左手方向、右手跳跃 + 道具(参考 IWBT Creator 的触屏布局)
// 左下方:← → 移动;右下方:大跳键 + 射击/下蹲 道具键 + 暂停/重生
import { setTouch, clearTouch } from './input.js';
import { Settings } from './settings.js';
// 持续按住型动作(通过 action 状态机驱动)
const HELD = ['left', 'right', 'jump', 'down'];
@@ -77,6 +78,7 @@ export const Touch = {
if (!root) root = q('#touch');
if (!root) return;
visible = true;
Settings.apply(); // 应用用户自定义的手柄布局
root.classList.remove('hidden');
},