增加场景切换功能

This commit is contained in:
Wurui
2025-11-08 12:15:58 +08:00
parent 49022f8626
commit 5a5aafeae5
94 changed files with 62524 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
using A2W;
using UnityEngine;
public static class StageSelector
{
public static async void EnterStage(string sceneName)
{
var loadingPanel = UIManager.instance.GetPanel<LoadingPanel>();
if (loadingPanel is null)
{
loadingPanel = await UIManager.instance.InitPanel<LoadingPanel>();
}
UIManager.instance.DestroyAllExceptLoading();
SceneLoader.instance.LoadScene(sceneName, loadingPanel);
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f749bfe3c2a6d0b49bfdb85b19692613