diff --git a/Assets/Scripts/Animation/OpeningFlowController.cs b/Assets/Scripts/Animation/OpeningFlowController.cs index 704471f..3797e84 100644 --- a/Assets/Scripts/Animation/OpeningFlowController.cs +++ b/Assets/Scripts/Animation/OpeningFlowController.cs @@ -105,31 +105,42 @@ public class OpeningFlowController : MonoBehaviour Debug.Log($"[OpeningFlow] Step1: man + man2 Idle ({_idleDuration}s)"); yield return new WaitForSeconds(_idleDuration); + // Step 2: Shoot —— 每帧强制 IsFull=false 防止 Animator 中途切走 Debug.Log("[OpeningFlow] Step2: man Shoot 动画开始"); if (_manAnimator != null) { _manAnimator.SetBool("IsFull", false); _manAnimator.SetBool("IsStart", true); - Debug.Log("[OpeningFlow] man IsStart=true, IsFull=false, 触发 Shoot"); - yield return new WaitForSeconds(3.15f); + Debug.Log("[OpeningFlow] man IsStart=true, IsFull=false, 触发 Shoot,每帧锁定 IsFull=false"); + + float shootElapsed = 0f; + while (shootElapsed < 3.15f) + { + shootElapsed += Time.deltaTime; + _manAnimator.SetBool("IsFull", false); + yield return null; + } _manAnimator.SetBool("IsStart", false); Debug.Log("[OpeningFlow] Step2: man Shoot 动画结束"); } + // Step 3: 摔倒 —— manfull 2.1s + 停留1s Debug.Log("[OpeningFlow] Step3: man Fall 动画开始"); if (_manAnimator != null) { _manAnimator.SetBool("IsFull", true); - Debug.Log("[OpeningFlow] man IsFull=true, 触发 manfull"); + Debug.Log("[OpeningFlow] man IsFull=true, 触发 manfull (2.1s)"); yield return new WaitForSeconds(2.1f); - Debug.Log("[OpeningFlow] Step3: man Fall 动画结束"); - yield return new WaitForSeconds(_fallHoldDuration); - Debug.Log($"[OpeningFlow] Step3: 摔倒后停留缓冲 {_fallHoldDuration}s 结束"); + Debug.Log("[OpeningFlow] Step3: man Fall 动画结束, 停留1s"); + yield return new WaitForSeconds(1f); } + // Step 4: 黑幕转场 —— 渐入 -> 切换角色+摄像机 -> 渐出 Debug.Log("[OpeningFlow] Step4: 黑幕转场开始"); yield return StartCoroutine(FadeBlackScreen(0f, 1f)); + // 隐藏 man 和 man2,显示 woman 和 maninjury + if (_manAnimator != null) { _manAnimator.gameObject.SetActive(false); Debug.Log("[OpeningFlow] man 已隐藏"); } if (_man2Object != null) { _man2Object.SetActive(false); Debug.Log("[OpeningFlow] man2 已隐藏"); } if (_womanObject != null) { _womanObject.SetActive(true); Debug.Log("[OpeningFlow] woman 已显示"); } if (_manInjuryObject != null) { _manInjuryObject.SetActive(true); Debug.Log("[OpeningFlow] maninjury 已显示"); }