启动流程修改
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user