启动流程修改

This commit is contained in:
2025-10-27 12:02:08 +08:00
parent ce8f5ce56f
commit 203d90d928
2 changed files with 111 additions and 98 deletions

View File

@@ -17,7 +17,7 @@ public class GameStart : MonoBehaviour
Debug.Log("开始游戏启动流程...");
yield return StartCoroutine(InitializeGameSystems());
yield return StartCoroutine(PreloadLoadingWindow());
yield return StartCoroutine(LoadMainScene());
Debug.Log("游戏启动流程完成");
@@ -30,6 +30,19 @@ public class GameStart : MonoBehaviour
Debug.Log("游戏系统初始化完成");
yield return null;
}
IEnumerator PreloadLoadingWindow()
{
bool preloadComplete = false;
UIManager.Inst.ShowWindow<LoadingWindow>("LoadingWindow", window =>
{
window.Hide();
preloadComplete = true;
Debug.Log("PreloadLoadingWindow");
});
yield return new WaitUntil(() => preloadComplete);
}
IEnumerator LoadMainScene()
{
SceneHandle sceneHandle = YooAssets.LoadSceneAsync("MirrorRoomOffline");