fix: _enableOpeningFlow=false时也要DeactivateManInjuryChildren+移入RunOpeningFlow

- skip分支加DeactivateManInjuryChildren调用
- 正常流程把清理从PlayOpeningFlow移到RunOpeningFlow(manInjury激活后)
- 确保无论是否播开场动画ping都不会残留
This commit is contained in:
yangbear
2026-07-04 16:54:46 +08:00
parent 77f6e2f00d
commit bde6db88ef
@@ -97,7 +97,7 @@ public class OpeningFlowController : MonoBehaviour
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);
if (_manInjuryObject != null) { _manInjuryObject.SetActive(true); DeactivateManInjuryChildren(); }
SwitchToCamera2();
onComplete?.Invoke();
return;
@@ -148,7 +148,7 @@ public class OpeningFlowController : MonoBehaviour
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 已显示"); }
if (_manInjuryObject != null) { _manInjuryObject.SetActive(true); DeactivateManInjuryChildren(); Debug.Log("[OpeningFlow] manInjury 已显示,子级已清理"); }
SwitchToCamera2();
yield return new WaitForSeconds(0.3f);