Files
opendance-windows/tasks/008-game-ui.md
T

41 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# T-WIN-008 主界面 + 游戏界面 + 结算
- **状态**:done
- **依赖**:T-WIN-002、T-WIN-003、T-WIN-006、T-WIN-007
## 目标
三页式体验:主菜单(选曲/选动作/选模型)→ 游戏页(3D 角色 + 实时评分 HUD)→ 结算页。
## load
```
DSH.md
src/ui/main.gd
src/ui/main_menu.gd
src/ui/game_screen.gd
src/ui/result_screen.gd
src/ui/ui_kit.gd
```
## 页面
| 页面 | 能力 |
|---|---|
| 主菜单 | 三栏选择(曲目 / 可评分动作 / 模型)、服务端地址编辑与测试、目录刷新、接收服务状态与重启 |
| 游戏页 | SubViewport 3D 角色、自动定机位、实时分数/等级/连击、进度条、连接状态提示、来源展示 |
| 结算 | 等级大字、平均/最终分、完成度、最高单帧、最长连击、评语、来源展示 |
## 关键实现
- 界面全部代码构建(见 DSH.md §6),主菜单只列出 `preprocessState == "done"` 的动作
- 游戏页订阅 `PoseReceiver.frame_received` 驱动骨骼,`ScoreService` 独立订阅做评分
- 未连接设备时给出明确提示而非静默失败;模型/序列拉取失败时显示可读原因并允许重试
- 参考序列走完自动结算
- 切换模型时正确 `dispose()` 旧场景,避免泄漏
## 验收
`GODOT --headless --path . --quit-after 180` 启动无运行时错误;
主菜单、游戏页、结算页的构造路径均被该启动流程覆盖。