Split game module documentation

This commit is contained in:
2026-06-09 23:11:08 +08:00
parent d41f9d1096
commit 0257c8058e
15 changed files with 647 additions and 88 deletions
+38
View File
@@ -0,0 +1,38 @@
# UI Overlay
## 职责
UI 模块负责局内 HUD、状态显示和调试面板。当前只有最小 overlay。
主要源码:
- `game/src/ui/game_ui_overlay.*`
## 当前能力
`GameUiOverlay` 继承引擎 `UIScene`,通过 `SceneManager` 进入 UI scene stack。
有字体时:
- 使用 `TextSprite` 显示游戏状态。
- 显示 debug 状态、battle zone、音频、存档、PVF、NPK、AudioDB 状态。
缺字体时:
- 使用 `Renderer::drawQuad` 画 fallback 色条。
- 不因字体缺失阻断 PC/Switch 启动。
## 资源
字体候选:
```text
assets/fonts/debug.ttf
assets/fonts/ui.ttf
```
## 下一步
- 增加血量、连击、联机状态等 gameplay HUD。
- 增加 debug 面板,替代部分 F 键调试。
- 确认 Switch 字体资源进入 RomFS 后再启用正式文字 UI。