feat: 音频系统重构 - bg音乐流程修复 + woman语音按点位播放

改动:
1. TouchPositionHandler新增voiceClip字段, 点击时播放对应语音
2. PageController.ShowPage: 首页播放homeBg
3. OnFixationSelected: StopBgMusic()(开场动画开始时停bg)
4. ActivateExperimentObjects: 移除PlayWomanAudioSequence, 保留PlayExperimentBg
5. 新增PlayHomeBg/StopBgMusic/PlayExperimentBg方法
6. 删除_audioManager冗余引用

流程:
首页→homeBg播 → 选固定方式→bg停 → 开场动画→实验bg播
woman语音1→点击point1播, 语音2→point2, 语音3→point3
This commit is contained in:
yangbear
2026-07-01 19:51:41 +08:00
parent 9548492391
commit 8dadc6a58d
14 changed files with 200 additions and 143 deletions
@@ -9,6 +9,7 @@ public class TouchPositionHandler : MonoBehaviour
public Transform targetPosition;
public GameObject womanObject;
public GameObject nextTouchObject;
public AudioClip voiceClip;
private MeshRenderer _meshRenderer;
@@ -37,7 +38,7 @@ public class TouchPositionHandler : MonoBehaviour
womanObject.transform.position = targetPosition.position;
womanObject.transform.rotation = targetPosition.rotation;
Debug.Log($"[TouchPosition] woman 移动到 {targetPosition.name}");
}
if (voiceClip != null) { var asrc = gameObject.AddComponent<AudioSource>(); asrc.PlayOneShot(voiceClip); Debug.Log("[TouchPosition] 播放语音: " + voiceClip.name); } }
// 通知 StepManager 记录步骤
int stepIndex = transform.GetSiblingIndex() + 1;