fix: PlayOpeningFlow/ReturnToHome重置所有ping/chanrao为隐藏
- OpeningFlowController新增DeactivateManInjuryChildren遍历隐藏 - PageController.ReturnToHome同样遍历隐藏ping/chanrao - 解决上一轮实验残留导致ping自动出现的bug
This commit is contained in:
@@ -31,6 +31,8 @@ public class OpeningFlowController : MonoBehaviour
|
||||
|
||||
if (_womanObject != null) _womanObject.SetActive(false);
|
||||
if (_manInjuryObject != null) _manInjuryObject.SetActive(false);
|
||||
// 确保所有 ping/chanrao/chanraotuibu 子级隐藏
|
||||
DeactivateManInjuryChildren();
|
||||
|
||||
if (_blackScreenPanel != null)
|
||||
{
|
||||
@@ -198,4 +200,15 @@ public class OpeningFlowController : MonoBehaviour
|
||||
[Header("=== 音效 ===")]
|
||||
[SerializeField] private AudioClip _basketballClip;
|
||||
[SerializeField] private AudioClip _manCallClip;
|
||||
private void DeactivateManInjuryChildren()
|
||||
{
|
||||
if (_manInjuryObject == null) return;
|
||||
foreach (Transform child in _manInjuryObject.transform)
|
||||
{
|
||||
if (child.name.Contains("ping") || child.name.Contains("chanrao"))
|
||||
child.gameObject.SetActive(false);
|
||||
}
|
||||
Debug.Log("[OpeningFlow] manInjury ping/chanrao 已全部隐藏");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user