Refine Shose undo back to initial voice, fix video looping and hiding, make TipPanel persistent during opening
This commit is contained in:
@@ -451,34 +451,12 @@ public class PageController : MonoBehaviour
|
||||
|
||||
Debug.Log($"PageController: 开始等待 {waitTime} 秒以切换摄像机并激活鞋子");
|
||||
|
||||
// --- 新增:展示 TipPanel 2秒 ---
|
||||
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);
|
||||
// 这里你可以修改 TipPanel 上的文字,如果不修改,它将保持默认内容
|
||||
// 等待2秒后再隐藏
|
||||
StartCoroutine(HideTipPanelAfterDelay(tipPanel, 2.0f));
|
||||
}
|
||||
// -------------------------------
|
||||
|
||||
yield return new WaitForSeconds(waitTime);
|
||||
|
||||
// 2. 切换到 camera3
|
||||
if (am != null) am.SwitchToCamera3();
|
||||
}
|
||||
|
||||
private System.Collections.IEnumerator HideTipPanelAfterDelay(GameObject tipPanel, float delay)
|
||||
{
|
||||
yield return new WaitForSeconds(delay);
|
||||
if (tipPanel != null) tipPanel.SetActive(false);
|
||||
}
|
||||
|
||||
private void HideShose()
|
||||
{
|
||||
var shose = GameObject.Find("Shose");
|
||||
|
||||
@@ -22,8 +22,12 @@ public class VideoController : MonoBehaviour
|
||||
|
||||
if (_videoPlayer != null)
|
||||
{
|
||||
_videoPlayer.isLooping = true;
|
||||
_videoPlayer.loopPointReached += OnVideoEnd;
|
||||
}
|
||||
|
||||
// 初始隐藏视频面板
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
/// <summary>播放指定视频文件(StreamingAssets/Videos/ 下)</summary>
|
||||
|
||||
Reference in New Issue
Block a user