fix: Shoot也改用Play直接播放,彻底绕过Animator Controller过渡
- Shoot和manfull都使用_manAnimator.Play()直接播放 - 开头加yield return null让Animator处理重置 - 不再依赖SetBool参数过渡,消除所有Animator Controller不确定性
This commit is contained in:
@@ -94,34 +94,30 @@ public class OpeningFlowController : MonoBehaviour
|
||||
{
|
||||
Debug.Log("=== [OpeningFlow] 片头动画流程开始 ===");
|
||||
|
||||
// 重置参数,默认 Idle
|
||||
// 重置 + 等一帧让 Animator 处理
|
||||
if (_manAnimator != null)
|
||||
{
|
||||
_manAnimator.SetBool("IsStart", false);
|
||||
_manAnimator.SetBool("IsFull", false);
|
||||
Debug.Log("[OpeningFlow] man Animator 已重置, 默认 Idle");
|
||||
}
|
||||
yield return null;
|
||||
|
||||
// Step 1: Idle 1s
|
||||
Debug.Log("[OpeningFlow] Step1: man + man2 Idle (1s)");
|
||||
yield return new WaitForSeconds(1f);
|
||||
|
||||
// Step 2: Shoot 3.15s
|
||||
Debug.Log("[OpeningFlow] Step2: man Shoot 开始 (3.15s)");
|
||||
// Step 2: Shoot 3.15s —— 直接 Play,不走 Animator 过渡
|
||||
Debug.Log("[OpeningFlow] Step2: Shoot 开始");
|
||||
if (_manAnimator != null)
|
||||
{
|
||||
_manAnimator.SetBool("IsStart", true);
|
||||
Debug.Log("[OpeningFlow] man IsStart=true, 等待 Shoot 播完");
|
||||
_manAnimator.Play("Shoot", 0, 0f);
|
||||
Debug.Log("[OpeningFlow] Shoot Play 已触发");
|
||||
}
|
||||
yield return new WaitForSeconds(3.15f);
|
||||
if (_manAnimator != null)
|
||||
{
|
||||
_manAnimator.SetBool("IsStart", false);
|
||||
Debug.Log("[OpeningFlow] Step2: Shoot 结束");
|
||||
}
|
||||
Debug.Log("[OpeningFlow] Step2: Shoot 结束");
|
||||
|
||||
// Step 3: 摔倒 manfull —— 直接 Play 不走过渡
|
||||
Debug.Log("[OpeningFlow] Step3: manfall 开始");
|
||||
// Step 3: 摔倒 manfull 2.1s + 停留 2s
|
||||
Debug.Log("[OpeningFlow] Step3: manfull 开始");
|
||||
if (_manAnimator != null)
|
||||
{
|
||||
_manAnimator.Play("manfull", 0, 0f);
|
||||
@@ -131,8 +127,8 @@ public class OpeningFlowController : MonoBehaviour
|
||||
Debug.Log("[OpeningFlow] manfull 播放完成, 停留 2s");
|
||||
yield return new WaitForSeconds(2f);
|
||||
|
||||
// Step 4: 黑幕转场
|
||||
Debug.Log("[OpeningFlow] Step4: 黑幕转场开始");
|
||||
// Step 4: 黑幕
|
||||
Debug.Log("[OpeningFlow] Step4: 黑幕");
|
||||
yield return StartCoroutine(FadeBlackScreen(0f, 1f));
|
||||
|
||||
if (_manAnimator != null) { _manAnimator.gameObject.SetActive(false); Debug.Log("[OpeningFlow] man 已隐藏"); }
|
||||
@@ -141,7 +137,6 @@ public class OpeningFlowController : MonoBehaviour
|
||||
if (_manInjuryObject != null) { _manInjuryObject.SetActive(true); Debug.Log("[OpeningFlow] manInjury 已显示"); }
|
||||
|
||||
SwitchToCamera2();
|
||||
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
yield return StartCoroutine(FadeBlackScreen(1f, 0f));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user