feat(ui): 添加 Terminal 风格主界面 UI 系统
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -52,7 +52,7 @@ namespace AibisDream
|
||||
{
|
||||
// 场景转换参数
|
||||
_isLoading = true;
|
||||
UIManager.Instance.GetPanel<InfoPanel>().ShowLoading();
|
||||
UIManager.Instance.ShowPreferredLoading();
|
||||
_sceneToLoad = targetScene;
|
||||
|
||||
// 在卸载场景前清理所有系统
|
||||
@@ -75,12 +75,17 @@ namespace AibisDream
|
||||
ResourceSystem.CreateSceneLoader();
|
||||
|
||||
_loadHandle = Addressables.LoadSceneAsync(_sceneToLoad, LoadSceneMode.Additive);
|
||||
yield return _loadHandle;
|
||||
while (!_loadHandle.IsDone)
|
||||
{
|
||||
UIManager.Instance.SetPreferredLoadingProgress(_loadHandle.PercentComplete);
|
||||
yield return null;
|
||||
}
|
||||
UIManager.Instance.SetPreferredLoadingProgress(1f);
|
||||
|
||||
// 场景加载完成,通知各系统
|
||||
EnumEventSystem.Global.Send(EventEnum.SceneLoad, _sceneToLoad);
|
||||
_currentSceneName = _sceneToLoad;
|
||||
UIManager.Instance.GetPanel<InfoPanel>().HideLoading();
|
||||
UIManager.Instance.HidePreferredLoading();
|
||||
_isLoading = false;
|
||||
}
|
||||
}
|
||||
@@ -108,4 +113,4 @@ namespace AibisDream
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user