2026-06-24 02:33:48 +08:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// UI 中央调度器:引用所有子面板,绑定 StepManager 事件。
|
2026-06-29 20:25:57 +08:00
|
|
|
|
/// 按钮策略:同时绑定 Inspector 引用(旧 RightButtons)和 ExperimentPanel/Navbar 按钮(新 UI),
|
|
|
|
|
|
/// 两者均可触发,互不冲突。
|
2026-06-24 02:33:48 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class UIManager : MonoBehaviour
|
|
|
|
|
|
{
|
|
|
|
|
|
[Header("管理器引用")]
|
|
|
|
|
|
[SerializeField] private StepManager _stepManager;
|
|
|
|
|
|
[SerializeField] private InteractionSystem _interactionSystem;
|
|
|
|
|
|
|
|
|
|
|
|
[Header("=== 顶部提示栏 ===")]
|
|
|
|
|
|
[SerializeField] private GameObject _tipPanel;
|
2026-06-24 02:44:58 +08:00
|
|
|
|
[SerializeField] private Text _tipText;
|
2026-06-24 02:33:48 +08:00
|
|
|
|
|
2026-06-24 02:44:58 +08:00
|
|
|
|
[Header("=== 详细操作说明面板 ===")]
|
2026-06-24 02:33:48 +08:00
|
|
|
|
[SerializeField] private GameObject _detailPanel;
|
2026-06-24 02:44:58 +08:00
|
|
|
|
[SerializeField] private Text _detailText;
|
2026-06-24 02:33:48 +08:00
|
|
|
|
|
|
|
|
|
|
[Header("=== 对话气泡 ===")]
|
|
|
|
|
|
[SerializeField] private GameObject _dialogueBubble;
|
2026-06-24 02:44:58 +08:00
|
|
|
|
[SerializeField] private Text _dialogueText;
|
2026-06-24 02:33:48 +08:00
|
|
|
|
|
|
|
|
|
|
[Header("=== 画中画视频 ===")]
|
|
|
|
|
|
[SerializeField] private VideoController _videoController;
|
|
|
|
|
|
|
2026-06-29 20:25:57 +08:00
|
|
|
|
[Header("=== 仿真导航栏按钮(旧引用 + Navbar)===")]
|
2026-06-24 02:33:48 +08:00
|
|
|
|
[SerializeField] private Button _btnFullScreen;
|
|
|
|
|
|
[SerializeField] private Button _btnPrevious;
|
|
|
|
|
|
[SerializeField] private Button _btnNext;
|
|
|
|
|
|
[SerializeField] private Button _btnSwitchMode;
|
|
|
|
|
|
[SerializeField] private Button _btnReturn;
|
2026-06-24 02:44:58 +08:00
|
|
|
|
[SerializeField] private Text _btnSwitchModeLabel;
|
2026-06-24 02:33:48 +08:00
|
|
|
|
|
|
|
|
|
|
[Header("=== 底部进度条 ===")]
|
|
|
|
|
|
[SerializeField] private Slider _progressBar;
|
2026-06-24 02:44:58 +08:00
|
|
|
|
[SerializeField] private Text _progressText;
|
2026-06-24 02:33:48 +08:00
|
|
|
|
|
|
|
|
|
|
[Header("=== 弹窗 ===")]
|
|
|
|
|
|
[SerializeField] private ExamPopup _examPopup;
|
|
|
|
|
|
[SerializeField] private ScoreDisplay _scoreDisplay;
|
|
|
|
|
|
|
2026-06-24 02:44:58 +08:00
|
|
|
|
[Header("=== 底部图标 ===")]
|
2026-06-24 02:33:48 +08:00
|
|
|
|
[SerializeField] private Button _btnCPR;
|
|
|
|
|
|
[SerializeField] private Button _btnFracture;
|
|
|
|
|
|
[SerializeField] private Button _btnSprain;
|
|
|
|
|
|
[SerializeField] private Button _btnBleeding;
|
|
|
|
|
|
[SerializeField] private Button _btnTransport;
|
|
|
|
|
|
|
|
|
|
|
|
[Header("=== 固定方式选择(仅骨折固定) ===")]
|
|
|
|
|
|
[SerializeField] private GameObject _fixationPanel;
|
|
|
|
|
|
[SerializeField] private Button _btnLimbFixation;
|
|
|
|
|
|
[SerializeField] private Button _btnSplintFixation;
|
|
|
|
|
|
|
|
|
|
|
|
private void Start()
|
|
|
|
|
|
{
|
2026-06-29 20:25:57 +08:00
|
|
|
|
Debug.Log("=== UIManager 初始化开始 ===");
|
|
|
|
|
|
|
2026-06-24 02:44:58 +08:00
|
|
|
|
if (_stepManager == null)
|
2026-06-29 20:25:57 +08:00
|
|
|
|
{
|
2026-06-24 02:44:58 +08:00
|
|
|
|
_stepManager = FindObjectOfType<StepManager>();
|
2026-06-29 20:25:57 +08:00
|
|
|
|
if (_stepManager != null) Debug.Log("UIManager: _stepManager 自动查找成功");
|
|
|
|
|
|
else Debug.LogError("UIManager: _stepManager 未找到!");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-24 02:44:58 +08:00
|
|
|
|
if (_interactionSystem == null)
|
2026-06-29 20:25:57 +08:00
|
|
|
|
{
|
2026-06-24 02:44:58 +08:00
|
|
|
|
_interactionSystem = FindObjectOfType<InteractionSystem>();
|
2026-06-29 20:25:57 +08:00
|
|
|
|
if (_interactionSystem != null) Debug.Log("UIManager: _interactionSystem 自动查找成功");
|
|
|
|
|
|
}
|
2026-06-24 02:44:58 +08:00
|
|
|
|
|
2026-06-24 02:33:48 +08:00
|
|
|
|
BindEvents();
|
2026-06-29 20:25:57 +08:00
|
|
|
|
BindButtons(); // 旧引用(RightButtons 等)
|
|
|
|
|
|
BindNavbarButtons(); // 新 Navbar 按钮
|
|
|
|
|
|
Debug.Log("=== UIManager 初始化完成 ===");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region Navbar 按钮绑定(始终执行,不依赖 Inspector 引用)
|
|
|
|
|
|
|
|
|
|
|
|
private void BindNavbarButtons()
|
|
|
|
|
|
{
|
|
|
|
|
|
Debug.Log("--- UIManager: 开始绑定 Navbar 按钮 ---");
|
|
|
|
|
|
|
|
|
|
|
|
var experimentPanel = GameObject.Find("ExperimentPanel");
|
|
|
|
|
|
if (experimentPanel == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
Debug.LogError("UIManager: ExperimentPanel 未找到!无法绑定 Navbar 按钮!");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var navbar = experimentPanel.transform.Find("Navbar");
|
|
|
|
|
|
if (navbar == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
Debug.LogError("UIManager: ExperimentPanel/Navbar 未找到!无法绑定 Navbar 按钮!");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// FullScreen
|
|
|
|
|
|
var btnFS = navbar.Find("FullScreen");
|
|
|
|
|
|
if (btnFS != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
var btn = btnFS.GetComponent<Button>();
|
|
|
|
|
|
if (btn != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
btn.onClick.AddListener(ToggleFullScreen);
|
|
|
|
|
|
Debug.Log("UIManager: Navbar/FullScreen 绑定成功 -> ToggleFullScreen");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else Debug.LogWarning("UIManager: Navbar/FullScreen 未找到");
|
|
|
|
|
|
|
|
|
|
|
|
// Previous
|
|
|
|
|
|
var btnPrev = navbar.Find("Previous");
|
|
|
|
|
|
if (btnPrev != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
var btn = btnPrev.GetComponent<Button>();
|
|
|
|
|
|
if (btn != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
btn.onClick.AddListener(OnPreviousClicked);
|
|
|
|
|
|
Debug.Log("UIManager: Navbar/Previous 绑定成功 -> OnPreviousClicked");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else Debug.LogWarning("UIManager: Navbar/Previous 未找到");
|
|
|
|
|
|
|
|
|
|
|
|
// Next
|
|
|
|
|
|
var btnNext = navbar.Find("Next");
|
|
|
|
|
|
if (btnNext != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
var btn = btnNext.GetComponent<Button>();
|
|
|
|
|
|
if (btn != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
btn.onClick.AddListener(OnNextClicked);
|
|
|
|
|
|
Debug.Log("UIManager: Navbar/Next 绑定成功 -> OnNextClicked");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else Debug.LogWarning("UIManager: Navbar/Next 未找到");
|
|
|
|
|
|
|
|
|
|
|
|
// PracticeMode
|
|
|
|
|
|
var btnMode = navbar.Find("PracticeMode");
|
|
|
|
|
|
if (btnMode != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
var btn = btnMode.GetComponent<Button>();
|
|
|
|
|
|
if (btn != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
btn.onClick.AddListener(OnSwitchModeClicked);
|
|
|
|
|
|
Debug.Log("UIManager: Navbar/PracticeMode 绑定成功 -> OnSwitchModeClicked");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else Debug.LogWarning("UIManager: Navbar/PracticeMode 未找到");
|
|
|
|
|
|
|
|
|
|
|
|
// BtnBack(返回按钮)
|
|
|
|
|
|
var btnBack = navbar.Find("BtnBack");
|
|
|
|
|
|
if (btnBack != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
var btn = btnBack.GetComponent<Button>();
|
|
|
|
|
|
if (btn != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
btn.onClick.AddListener(OnReturnClicked);
|
|
|
|
|
|
Debug.Log("UIManager: Navbar/BtnBack 绑定成功 -> OnReturnClicked");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else Debug.LogWarning("UIManager: Navbar/BtnBack 未找到");
|
|
|
|
|
|
|
|
|
|
|
|
Debug.Log("--- UIManager: Navbar 按钮绑定完成 ---");
|
2026-06-24 02:33:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-29 20:25:57 +08:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
2026-06-24 02:33:48 +08:00
|
|
|
|
#region 事件绑定
|
|
|
|
|
|
|
|
|
|
|
|
private void BindEvents()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_stepManager == null) return;
|
|
|
|
|
|
|
|
|
|
|
|
_stepManager.OnStepChanged.AddListener(OnStepChanged);
|
|
|
|
|
|
_stepManager.OnTipChanged.AddListener(UpdateTip);
|
|
|
|
|
|
_stepManager.OnDialogueChanged.AddListener(UpdateDialogue);
|
|
|
|
|
|
_stepManager.OnDetailedContent.AddListener(UpdateDetailContent);
|
|
|
|
|
|
_stepManager.OnExamPopup.AddListener(ShowExamPopup);
|
|
|
|
|
|
_stepManager.OnExperimentComplete.AddListener(OnExperimentComplete);
|
|
|
|
|
|
_stepManager.OnVideoToggle.AddListener(ToggleVideo);
|
2026-06-29 20:25:57 +08:00
|
|
|
|
Debug.Log("UIManager: StepManager 事件绑定完成");
|
2026-06-24 02:33:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void BindButtons()
|
|
|
|
|
|
{
|
2026-06-29 20:25:57 +08:00
|
|
|
|
if (_btnFullScreen != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
_btnFullScreen.onClick.AddListener(ToggleFullScreen);
|
|
|
|
|
|
Debug.Log("UIManager: _btnFullScreen 绑定成功");
|
|
|
|
|
|
}
|
|
|
|
|
|
if (_btnPrevious != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
_btnPrevious.onClick.AddListener(OnPreviousClicked);
|
|
|
|
|
|
Debug.Log("UIManager: _btnPrevious 绑定成功");
|
|
|
|
|
|
}
|
|
|
|
|
|
if (_btnNext != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
_btnNext.onClick.AddListener(OnNextClicked);
|
|
|
|
|
|
Debug.Log("UIManager: _btnNext 绑定成功");
|
|
|
|
|
|
}
|
|
|
|
|
|
if (_btnSwitchMode != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
_btnSwitchMode.onClick.AddListener(OnSwitchModeClicked);
|
|
|
|
|
|
Debug.Log("UIManager: _btnSwitchMode 绑定成功");
|
|
|
|
|
|
}
|
|
|
|
|
|
if (_btnReturn != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
_btnReturn.onClick.AddListener(OnReturnClicked);
|
|
|
|
|
|
Debug.Log("UIManager: _btnReturn 绑定成功");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (_btnLimbFixation != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
_btnLimbFixation.onClick.AddListener(() => {
|
|
|
|
|
|
Debug.Log("UIManager: [BtnLimbFixation] 点击 -> 肢体固定");
|
|
|
|
|
|
_stepManager?.SwitchFixation(FixationMethod.LimbFixation);
|
|
|
|
|
|
});
|
|
|
|
|
|
Debug.Log("UIManager: _btnLimbFixation 绑定成功");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (_btnSplintFixation != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
_btnSplintFixation.onClick.AddListener(() => {
|
|
|
|
|
|
Debug.Log("UIManager: [BtnSplintFixation] 点击 -> 夹板固定");
|
|
|
|
|
|
_stepManager?.SwitchFixation(FixationMethod.SplintFixation);
|
|
|
|
|
|
});
|
|
|
|
|
|
Debug.Log("UIManager: _btnSplintFixation 绑定成功");
|
|
|
|
|
|
}
|
2026-06-24 02:33:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region UI 更新回调
|
|
|
|
|
|
|
|
|
|
|
|
private void OnStepChanged(int index)
|
|
|
|
|
|
{
|
2026-06-29 20:25:57 +08:00
|
|
|
|
Debug.Log($"UIManager: [OnStepChanged] 步骤 = {index + 1}");
|
2026-06-24 02:33:48 +08:00
|
|
|
|
UpdateProgressBar();
|
|
|
|
|
|
UpdateNavigationButtons();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void UpdateTip(string text)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_tipPanel != null) _tipPanel.SetActive(!string.IsNullOrEmpty(text));
|
|
|
|
|
|
if (_tipText != null) _tipText.text = text;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void UpdateDialogue(string text)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_dialogueBubble != null) _dialogueBubble.SetActive(!string.IsNullOrEmpty(text));
|
|
|
|
|
|
if (_dialogueText != null) _dialogueText.text = text;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void UpdateDetailContent(string text)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_detailPanel != null) _detailPanel.SetActive(!string.IsNullOrEmpty(text));
|
|
|
|
|
|
if (_detailText != null) _detailText.text = text;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void ToggleVideo(string fileName, bool active)
|
|
|
|
|
|
{
|
2026-06-29 20:25:57 +08:00
|
|
|
|
Debug.Log($"UIManager: [ToggleVideo] file={fileName}, active={active}");
|
2026-06-24 02:33:48 +08:00
|
|
|
|
if (_videoController == null) return;
|
|
|
|
|
|
if (active && !string.IsNullOrEmpty(fileName))
|
|
|
|
|
|
_videoController.PlayVideo(fileName);
|
|
|
|
|
|
else
|
|
|
|
|
|
_videoController.StopVideo();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void UpdateProgressBar()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_stepManager == null) return;
|
|
|
|
|
|
int cur = _stepManager.CurrentStepIndex + 1;
|
|
|
|
|
|
int total = _stepManager.TotalSteps;
|
|
|
|
|
|
if (_progressBar != null) _progressBar.value = (float)cur / total;
|
2026-06-24 02:44:58 +08:00
|
|
|
|
if (_progressText != null) _progressText.text = cur + "/" + total;
|
2026-06-24 02:33:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void UpdateNavigationButtons()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_stepManager == null) return;
|
2026-06-29 20:25:57 +08:00
|
|
|
|
if (_btnPrevious != null) _btnPrevious.interactable = _stepManager.CurrentStepIndex > 0;
|
|
|
|
|
|
if (_btnNext != null)
|
2026-06-24 02:33:48 +08:00
|
|
|
|
{
|
2026-06-24 02:44:58 +08:00
|
|
|
|
var label = _btnNext.GetComponentInChildren<Text>();
|
|
|
|
|
|
bool isLast = _stepManager.CurrentStepIndex >= _stepManager.TotalSteps - 1;
|
2026-06-24 02:33:48 +08:00
|
|
|
|
if (label != null) label.text = isLast ? "完成" : "下一步";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 考核弹窗
|
|
|
|
|
|
|
|
|
|
|
|
private void ShowExamPopup(StepData step)
|
|
|
|
|
|
{
|
2026-06-29 20:25:57 +08:00
|
|
|
|
Debug.Log($"UIManager: [ShowExamPopup] 题目={step.ExamQuestionText}");
|
2026-06-24 02:33:48 +08:00
|
|
|
|
if (_examPopup == null) return;
|
|
|
|
|
|
_examPopup.Show(step, OnExamAnswer);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnExamAnswer(float proportion, string feedback)
|
|
|
|
|
|
{
|
2026-06-29 20:25:57 +08:00
|
|
|
|
Debug.Log($"UIManager: [OnExamAnswer] proportion={proportion}, feedback={feedback}");
|
2026-06-24 02:33:48 +08:00
|
|
|
|
_stepManager?.OnStepInteractionComplete(proportion, feedback);
|
|
|
|
|
|
_stepManager?.NextStep();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 实验完成
|
|
|
|
|
|
|
|
|
|
|
|
private void OnExperimentComplete()
|
|
|
|
|
|
{
|
2026-06-29 20:25:57 +08:00
|
|
|
|
Debug.Log("UIManager: [OnExperimentComplete] 实验完成");
|
2026-06-24 02:33:48 +08:00
|
|
|
|
var gm = GameManager.Instance;
|
|
|
|
|
|
if (gm == null) return;
|
|
|
|
|
|
if (gm.CurrentMode == ExperimentMode.Exam)
|
|
|
|
|
|
_scoreDisplay?.ShowExamScore();
|
|
|
|
|
|
else
|
|
|
|
|
|
_scoreDisplay?.ShowNotesOnly();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 按钮回调
|
|
|
|
|
|
|
|
|
|
|
|
private void ToggleFullScreen()
|
|
|
|
|
|
{
|
|
|
|
|
|
Screen.fullScreen = !Screen.fullScreen;
|
2026-06-29 20:25:57 +08:00
|
|
|
|
Debug.Log($"UIManager: [ToggleFullScreen] 全屏 = {Screen.fullScreen}");
|
2026-06-24 02:33:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnPreviousClicked()
|
|
|
|
|
|
{
|
2026-06-29 20:25:57 +08:00
|
|
|
|
Debug.Log("UIManager: [OnPreviousClicked] -> 上一步");
|
2026-06-24 02:33:48 +08:00
|
|
|
|
_stepManager?.PreviousStep();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnNextClicked()
|
|
|
|
|
|
{
|
2026-06-29 20:25:57 +08:00
|
|
|
|
Debug.Log("UIManager: [OnNextClicked] -> 下一步");
|
2026-06-24 02:44:58 +08:00
|
|
|
|
if (_stepManager != null && _stepManager.Mode == ExperimentMode.Exam)
|
2026-06-24 02:33:48 +08:00
|
|
|
|
{
|
|
|
|
|
|
var step = _stepManager.GetCurrentStep();
|
|
|
|
|
|
if (step != null && step.CompleteType != StepCompleteType.MultipleChoice)
|
|
|
|
|
|
_stepManager.OnStepInteractionComplete(1f);
|
|
|
|
|
|
}
|
2026-06-24 02:44:58 +08:00
|
|
|
|
_stepManager?.NextStep();
|
2026-06-24 02:33:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnSwitchModeClicked()
|
|
|
|
|
|
{
|
2026-06-24 02:44:58 +08:00
|
|
|
|
if (_stepManager == null) return;
|
2026-06-29 20:25:57 +08:00
|
|
|
|
var oldMode = _stepManager.Mode;
|
|
|
|
|
|
var newMode = oldMode == ExperimentMode.Learn ? ExperimentMode.Exam : ExperimentMode.Learn;
|
|
|
|
|
|
Debug.Log($"UIManager: [OnSwitchModeClicked] 切换 {oldMode} -> {newMode}");
|
2026-06-24 02:33:48 +08:00
|
|
|
|
_stepManager.SwitchMode(newMode);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void OnReturnClicked()
|
|
|
|
|
|
{
|
2026-06-29 20:25:57 +08:00
|
|
|
|
Debug.Log("UIManager: [OnReturnClicked] -> 返回首页");
|
2026-06-25 04:37:45 +08:00
|
|
|
|
var pageCtrl = FindObjectOfType<PageController>();
|
|
|
|
|
|
if (pageCtrl != null)
|
|
|
|
|
|
pageCtrl.ReturnToHome();
|
|
|
|
|
|
else
|
2026-06-29 20:25:57 +08:00
|
|
|
|
Debug.LogWarning("UIManager: 未找到 PageController。");
|
2026-06-24 02:33:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|