diff --git a/Assets/Scripts/Animation/OpeningFlowController.cs b/Assets/Scripts/Animation/OpeningFlowController.cs index bd0dcef..57bb831 100644 --- a/Assets/Scripts/Animation/OpeningFlowController.cs +++ b/Assets/Scripts/Animation/OpeningFlowController.cs @@ -86,15 +86,22 @@ public class OpeningFlowController : MonoBehaviour public void PlayOpeningFlow(System.Action onComplete) { - Debug.Log("[OpeningFlow] PlayOpeningFlow() 被调用"); + Debug.Log($"[OpeningFlow] PlayOpeningFlow() 被调用, enable={_enableOpeningFlow}"); - if (_manAnimator != null) + if (!_enableOpeningFlow) { - _manAnimator.gameObject.SetActive(true); - _manAnimator.SetBool("IsStart", false); - _manAnimator.SetBool("IsFull", false); - _manAnimator.Play("manIdle", 0, 0f); + Debug.Log("[OpeningFlow] 开场动画已禁用,直接跳过"); + // 跳过动画但状态还是要切:隐藏man/man2,显示woman/manInjury,切camera2 + if (_manAnimator != null) _manAnimator.gameObject.SetActive(false); + if (_man2Object != null) _man2Object.SetActive(false); + if (_womanObject != null) _womanObject.SetActive(true); + if (_manInjuryObject != null) _manInjuryObject.SetActive(true); + SwitchToCamera2(); + onComplete?.Invoke(); + return; } + + if (_manAnimator != null) { _manAnimator.gameObject.SetActive(true); _manAnimator.SetBool("IsStart", false); _manAnimator.SetBool("IsFull", false); _manAnimator.Play("manIdle", 0, 0f); } if (_man2Object != null) _man2Object.SetActive(true); if (_womanObject != null) _womanObject.SetActive(false); if (_manInjuryObject != null) _manInjuryObject.SetActive(false); @@ -195,4 +202,8 @@ public class OpeningFlowController : MonoBehaviour if (toAlpha <= 0.01f) _blackScreenPanel.SetActive(false); } + + + [Header("=== 开关 ===")] + [SerializeField] private bool _enableOpeningFlow = true; }