Skip to content

feat(mobile): 虚拟摇杆 + 触摸技能按钮#1

Merged
feuvan merged 1 commit into
mainfrom
feat/mobile-controls
Mar 15, 2026
Merged

feat(mobile): 虚拟摇杆 + 触摸技能按钮#1
feuvan merged 1 commit into
mainfrom
feat/mobile-controls

Conversation

@feuvan

@feuvan feuvan commented Mar 15, 2026

Copy link
Copy Markdown
Owner

移动端操控支持

新增 MobileControlsSystem,仅在移动端/平板设备上显示:

功能

  • 虚拟摇杆(左侧):拖拽移动,支持任意方向
  • 技能按钮(右侧):6个技能槽,2×3网格布局,对应键盘1-6
  • 自动战斗切换:一键开关
  • 面板快捷按钮:背包/角色/技能/地图/家园/任务

技术细节

  • 纯 Phaser 指针/触摸事件,无外部依赖
  • 半透明覆盖层,不遮挡游戏画面
  • 响应式尺寸,适配不同屏幕
  • 通过 EventBus 与现有系统集成,键盘和触控可共存
  • 移动端检测:touch support + UA + 屏幕尺寸

改动

  • src/systems/MobileControlsSystem.ts — 新增(299行)
  • src/scenes/ZoneScene.ts — 集成移动端控制系统

Adds MobileControlsSystem with virtual joystick (left side), 6 skill
buttons (right side, 2x3 grid), auto-combat toggle, and panel shortcut
buttons (inventory, character, skills, map, homestead, quest). Controls
are semi-transparent overlays, only shown on mobile/tablet devices, and
integrate with existing keyboard controls via EventBus events.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@feuvan feuvan merged commit 982e617 into main Mar 15, 2026
feuvan added a commit that referenced this pull request Mar 24, 2026
…ion, tint management, teleport fallback, typing

- Fix #1: Dual Wield Mastery buff spam — use tag-based guard instead of wrong stat name
- Fix #2: Monster respawn stat inflation — use originalDefinition to prevent compounding
- Fix #3: preFX.clear() on effect expiry — re-apply remaining active tints after clear
- Fix #4: Teleport no fallback — abort teleport and refund mana when no walkable tile found
- Fix #5: applyStatusTint() every frame — add statusTintApplied tracking map
- Fix #6: Curse aura 'as any' — add optional tag field to ActiveBuff interface
- Fix #7: Frenzy description mismatch — remove attack speed claim, match damageBonus mechanic

30 new validation tests covering all fixes. 1473 total tests pass.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant