mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-12 05:08:58 +08:00
- 新增输入绑定 DTO、设备上下文和 UI 语义桥接契约。 - 实现 Game 默认输入绑定存储、动作映射和 UI 分发桥接。 - 落地 Godot InputMap 适配、测试覆盖与配套文档。 - 更新 ai-plan 恢复点、worktree 映射与采用入口。
2.0 KiB
2.0 KiB
Input System Godot Integration 追踪
2026-05-10
阶段:统一输入抽象与 Godot 适配首轮落地(RP-001)
- 创建长分支
feat/input-system-godot-integration,并在GFramework-WorkTree/GFramework-input-system-godot-integration建立独立 worktree - 在
GFramework.Game.Abstractions/Input/新增:InputBindingDescriptorInputActionBindingInputBindingSnapshotInputDeviceContextIInputBindingStoreIInputDeviceTrackerIUiInputActionMapIUiInputDispatcher
- 在
GFramework.Game/Input/新增:InputBindingStoreInputDeviceTrackerUiInputActionMapUiInputDispatcher
- 在
GFramework.Godot/Input/新增:GodotInputBindingCodecIGodotInputMapBackendGodotInputMapBackendGodotInputBindingStore
- 关键设计决策:
- 保留字符串动作名,直接复用
InputActions.*常量 - 抽象层只暴露 descriptor / snapshot,不暴露 Godot
InputEvent - Godot backend 改成 descriptor-based contract,避免测试直接依赖原生
InputEvent实例 SetPrimaryBinding(...)改为按完整快照回写后端,以保留冲突交换语义
- 保留字符串动作名,直接复用
- 新增测试:
GFramework.Game.Tests/Input/InputBindingStoreTests.csGFramework.Game.Tests/Input/UiInputDispatcherTests.csGFramework.Godot.Tests/Input/GodotInputBindingStoreTests.cs
- 文档更新:
- 新增
docs/zh-CN/game/input.md - 新增
docs/zh-CN/godot/input.md - 更新
docs/zh-CN/game/index.md - 更新
docs/zh-CN/godot/index.md - 更新
docs/zh-CN/tutorials/godot-integration.md - 更新
GFramework.Game.Abstractions/README.md - 更新
GFramework.Game/README.md - 更新
GFramework.Godot/README.md
- 新增
下一步
- 若继续推进输入系统,优先定义更多逻辑动作与 gameplay 输入桥接,而不是先扩到宿主品牌文案
- 若要增强 Godot 验证,单独准备真实
InputMap/InputEvent集成宿主,而不是依赖普通 VSTest process