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:
2026-06-10 14:14:08 +08:00
parent 32566020c7
commit a1f54b68e6
23 changed files with 6085 additions and 554 deletions

View File

@@ -247,6 +247,7 @@ GameObject:
- component: {fileID: 3038514324348343369}
- component: {fileID: 8116248334753210478}
- component: {fileID: 2674139131311821727}
- component: {fileID: 1348220184733719450}
m_Layer: 9
m_Name: Player
m_TagString: Player
@@ -759,6 +760,25 @@ MonoBehaviour:
- {fileID: 0}
_namedPresets: []
_sfxPresets: []
--- !u!114 &1348220184733719450
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6834103521996502824}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50b55c5d6664b9f4b8fd1104f272bb8f, type: 3}
m_Name:
m_EditorClassIdentifier:
_detectRadius: 1.5
_interactableLayer:
serializedVersion: 2
m_Bits: 16777216
_inputReader: {fileID: 11400000, guid: 88fadef8bc554e04483edd7418d20aa2, type: 2}
_onShowInteractPrompt: {fileID: 11400000, guid: 18bb3dbe7d352dc4a9b62b13e068eb9d, type: 2}
_onHideInteractPrompt: {fileID: 11400000, guid: b8cfbee27c2493e4ea75b4158a74a7c4, type: 2}
--- !u!1001 &5247753868797769228
PrefabInstance:
m_ObjectHideFlags: 0