From b18d28fc40dad38f2c85f00fa88c8ea89b114df6 Mon Sep 17 00:00:00 2001 From: yangbear Date: Sat, 11 Jul 2026 05:28:03 +0800 Subject: [PATCH] Move fracture voice from Shose click to Point2 click --- Assets/Scripts/Interaction/Point2ClickHandler.cs | 10 ++++++++++ Assets/Scripts/Interaction/ShoseClickHandler.cs | 10 +--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Assets/Scripts/Interaction/Point2ClickHandler.cs b/Assets/Scripts/Interaction/Point2ClickHandler.cs index 1ed3015..948be4a 100644 --- a/Assets/Scripts/Interaction/Point2ClickHandler.cs +++ b/Assets/Scripts/Interaction/Point2ClickHandler.cs @@ -72,6 +72,16 @@ public class Point2ClickHandler : MonoBehaviour } } + // 播放语音 + var am = FindObjectOfType(); + if (am != null) + { +#if UNITY_EDITOR + var fractureClip = UnityEditor.AssetDatabase.LoadAssetAtPath("Assets/Audio/people/伤员左大腿疑似骨折,无伤口.mp3"); + if (fractureClip != null) am.PlayVoice(fractureClip); +#endif + } + if (nextObject != null) { var shoseHandler = nextObject.GetComponent(); diff --git a/Assets/Scripts/Interaction/ShoseClickHandler.cs b/Assets/Scripts/Interaction/ShoseClickHandler.cs index 875765b..bc01bd0 100644 --- a/Assets/Scripts/Interaction/ShoseClickHandler.cs +++ b/Assets/Scripts/Interaction/ShoseClickHandler.cs @@ -137,15 +137,7 @@ public class ShoseClickHandler : MonoBehaviour touchPoint3.gameObject.SetActive(false); } - // 点击鞋子时播放原本挂在 point1 上的那段语音(伤员左大腿疑似骨折) - var am = FindObjectOfType(); - if (am != null) - { -#if UNITY_EDITOR - var fractureClip = UnityEditor.AssetDatabase.LoadAssetAtPath("Assets/Audio/people/伤员左大腿疑似骨折,无伤口.mp3"); - if (fractureClip != null) am.PlayVoice(fractureClip); -#endif - } + } // 切换到摄像机3