fix: 清理AI遗留代码,修复场景配置
- 删除三套旧菜单系统 (MainMenu.cs, MainMenuUI.cs, ModeSelectionUI.cs) - Ground 添加 BoxCollider 并设置 tag 为 Ground - UIManager.OnReturnClicked 改为通过 PageController 返回首页 - PageController 增加 ReturnToHome 方法,管理 BtnFixationBack 可见性 - 清理废弃场景 Experiment.unity / ModeSelection.unity 及历史截图
This commit is contained in:
@@ -126,18 +126,18 @@ public class PageController : MonoBehaviour
|
||||
|
||||
#region 页面切换
|
||||
|
||||
private void ShowPage(Page page)
|
||||
private void ShowPage(Page page)
|
||||
{
|
||||
_currentPage = page;
|
||||
|
||||
if (_homePagePanel != null) _homePagePanel.SetActive(page == Page.Home);
|
||||
if (_modeSelectPanel != null) _modeSelectPanel.SetActive(page == Page.ModeSelect);
|
||||
if (_fixationPanel != null) _fixationPanel.SetActive(page == Page.Fixation);
|
||||
if (_btnFixationBack != null) _btnFixationBack.gameObject.SetActive(page == Page.Fixation);
|
||||
|
||||
if (_uiManager != null)
|
||||
_uiManager.enabled = (page == Page.Experiment);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 按钮回调
|
||||
@@ -206,5 +206,11 @@ public class PageController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void ReturnToHome()
|
||||
{
|
||||
ShowPage(Page.Home);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user