feat(input): 扩展输入阶段支持

新增对 Capture 阶段输入事件的支持,不再仅限于 Bubble 阶段处理输入。
此更改允许在拖拽等场景中,在 Capture 阶段也能正确处理输入事件,
提升输入处理的灵活性和准确性。
This commit is contained in:
GwWuYou 2025-12-22 19:50:19 +08:00
parent e39f32d9a8
commit c3224d8469

View File

@ -23,8 +23,9 @@ public sealed class GodotInputTranslator : IInputTranslator
var evt = raw.Event;
// 示例规则:只在 Bubble 阶段生成游戏输入
if (raw.Phase != GodotInputPhase.Bubble)
// 支持多个输入阶段Capture, Bubble, 和其他阶段
// 在拖拽过程中可能需要在Capture阶段也处理输入
if (raw.Phase != GodotInputPhase.Bubble && raw.Phase != GodotInputPhase.Capture)
return false;
// Action