Refactor interaction prompt system to use world space prompts
- Removed the InteractPromptWidget from HUD and its references in HUDController. - Introduced IInteractPromptView interface for world space interaction prompts. - Implemented WorldInteractPrompt class to manage display of interaction prompts in world space. - Updated InteractableDetector to handle showing/hiding of world space prompts based on player proximity to interactable objects. - Created a new prefab for UI_WorldInteractPrompt to facilitate the new interaction prompt system.
This commit is contained in:
@@ -22,7 +22,7 @@ namespace BaseGames.Editor.Input
|
||||
/// ① 当前 Action × 当前设备的绑定路径 + Sprite 字段
|
||||
/// ② 48px 大图预览
|
||||
/// ③ 所有设备快览行(4 行)
|
||||
/// ④ 模拟 InteractPromptWidget 外观预览
|
||||
/// ④ 模拟交互提示 外观预览
|
||||
///
|
||||
/// 菜单:BaseGames / Input Icon Studio (priority=55)
|
||||
/// </summary>
|
||||
@@ -621,7 +621,7 @@ namespace BaseGames.Editor.Input
|
||||
var effectivePath = GetEffectivePath(_selectedAction);
|
||||
var sprite = (iconSet != null && effectivePath != null) ? iconSet.GetIcon(effectivePath) : null;
|
||||
|
||||
// 模拟 InteractPromptWidget 的外观
|
||||
// 模拟交互提示 的外观
|
||||
var mockup = new VisualElement();
|
||||
mockup.style.flexDirection = FlexDirection.Row;
|
||||
mockup.style.alignItems = Align.Center;
|
||||
|
||||
Reference in New Issue
Block a user