Hide TipPanel at opening start, show it when opening finishes, and hide it when switching camera

This commit is contained in:
yangbear
2026-07-10 23:58:43 +08:00
parent fec97295be
commit b35afe1022
2 changed files with 14 additions and 11 deletions
+12 -1
View File
@@ -462,9 +462,20 @@ public class PageController : MonoBehaviour
Debug.Log($"PageController: 开始等待 {waitTime} 秒以切换摄像机并激活鞋子");
// --- 开场动画结束,开始显示 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);
// ---------------------------------------------------------------------
yield return new WaitForSeconds(waitTime);
// 2. 切换到 camera3
// 2. 切换到 camera3 (注意原逻辑是切到 camera3,如果说是要在这里隐藏TipPanel)
if (tipPanel != null) tipPanel.SetActive(false);
if (am != null) am.SwitchToCamera3();
}