diff --git a/Assets/Scripts/UI/PageController.cs b/Assets/Scripts/UI/PageController.cs index 5ce117d..03ebc33 100644 --- a/Assets/Scripts/UI/PageController.cs +++ b/Assets/Scripts/UI/PageController.cs @@ -49,13 +49,6 @@ public class PageController : MonoBehaviour { Debug.Log("=== PageController 初始化开始 ==="); - // 背景音乐 AudioSource - var mgr = GameObject.Find("[Managers]"); - if (mgr != null) { _bgAudioSource = mgr.AddComponent(); } - else { _bgAudioSource = gameObject.AddComponent(); } - _bgAudioSource.loop = true; - _bgAudioSource.playOnAwake = false; - _bgAudioSource.spatialBlend = 0f; // 关掉多余AudioListener(只留Main Camera的) var cam2 = GameObject.Find("camera2"); if (cam2 != null) { var al = cam2.GetComponent(); if (al != null) al.enabled = false; } var cam3 = GameObject.Find("camera3"); if (cam3 != null) { var al = cam3.GetComponent(); if (al != null) al.enabled = false; } @@ -274,7 +267,7 @@ public class PageController : MonoBehaviour { Debug.Log("PageController: [ActivateExperimentObjects] 显示实验物件"); - PlayExperimentBg(); + BGMController.PlayExperimentBg(); var allObjects = FindObjectsOfType(true); foreach (var go in allObjects)