Refine Shose undo back to initial voice, fix video looping and hiding, make TipPanel persistent during opening

This commit is contained in:
yangbear
2026-07-10 03:50:39 +08:00
parent ec503bd3f1
commit 745b11b7f0
5 changed files with 72 additions and 22 deletions
@@ -94,6 +94,15 @@ public class OpeningFlowController : MonoBehaviour
{
Debug.Log($"[OpeningFlow] PlayOpeningFlow() 被调用, enable={_enableOpeningFlow}");
// 展示 TipPanel,一直保持到切换 camera2
var tipPanel = GameObject.Find("TipPanel");
if (tipPanel == null)
{
var allT = Resources.FindObjectsOfTypeAll<Transform>();
foreach(var t in allT) { if (t.name == "TipPanel") { tipPanel = t.gameObject; break; } }
}
if (tipPanel != null) tipPanel.SetActive(true);
// 再次确保开场隐藏鞋子
var shose = GameObject.Find("Shose");
if (shose != null) shose.SetActive(false);
@@ -168,6 +177,14 @@ public class OpeningFlowController : MonoBehaviour
private void SwitchToCamera2()
{
var tipPanel = GameObject.Find("TipPanel");
if (tipPanel == null)
{
var allT = Resources.FindObjectsOfTypeAll<Transform>();
foreach(var t in allT) { if (t.name == "TipPanel") { tipPanel = t.gameObject; break; } }
}
if (tipPanel != null) tipPanel.SetActive(false);
var cam2Go = GameObject.Find("camera2");
if (cam2Go != null) { var c = cam2Go.GetComponent<Camera>(); if (c != null) { c.enabled = true; Debug.Log("[OpeningFlow] camera2 已启用"); } }
else Debug.LogWarning("[OpeningFlow] 未找到 camera2");