diff --git a/Assets/Scripts/Animation/OpeningFlowController.cs b/Assets/Scripts/Animation/OpeningFlowController.cs index 87c8c38..7856024 100644 --- a/Assets/Scripts/Animation/OpeningFlowController.cs +++ b/Assets/Scripts/Animation/OpeningFlowController.cs @@ -127,7 +127,7 @@ public class OpeningFlowController : MonoBehaviour // Step 2: Shoot + 篮球音效 Debug.Log("[OpeningFlow] Step2: Shoot 开始"); - if (_basketballClip != null) AudioSource.PlayClipAtPoint(_basketballClip, Camera.main != null ? Camera.main.transform.position : Vector3.zero); + if (_basketballClip != null) AudioSource.PlayClipAtPoint(_basketballClip, transform.position); if (_manAnimator != null) { _manAnimator.Play("Shoot", 0, 0f); Debug.Log("[OpeningFlow] Shoot Play 已触发"); } yield return new WaitForSeconds(3.15f); Debug.Log("[OpeningFlow] Step2: Shoot 结束"); @@ -136,7 +136,7 @@ public class OpeningFlowController : MonoBehaviour Debug.Log("[OpeningFlow] Step3: manfull 开始"); if (_manAnimator != null) { _manAnimator.Play("manfull", 0, 0f); } yield return new WaitForSeconds(2.1f); - if (_manCallClip != null) AudioSource.PlayClipAtPoint(_manCallClip, Camera.main != null ? Camera.main.transform.position : Vector3.zero); + if (_manCallClip != null) AudioSource.PlayClipAtPoint(_manCallClip, transform.position); Debug.Log("[OpeningFlow] manfull 播放完成, 停留 2s"); yield return new WaitForSeconds(2f); diff --git a/Assets/Scripts/UI/PageController.cs b/Assets/Scripts/UI/PageController.cs index b5358de..297b699 100644 --- a/Assets/Scripts/UI/PageController.cs +++ b/Assets/Scripts/UI/PageController.cs @@ -146,7 +146,7 @@ public class PageController : MonoBehaviour private void PlayHomeBg() { - if (_homeBgClip != null && _bgAudioSource != null && _bgAudioSource.clip != _homeBgClip) + if (_homeBgClip != null && _bgAudioSource != null) { _bgAudioSource.clip = _homeBgClip; _bgAudioSource.Play();