问题修改
This commit is contained in:
@@ -32,9 +32,9 @@ namespace AibisDream
|
||||
/// 同步场景转换
|
||||
/// </summary>
|
||||
/// <param name="targetScene">目标场景</param>
|
||||
public void LoadScene(string targetScene)
|
||||
public void LoadScene(string targetScene, Action onComplete = null)
|
||||
{
|
||||
StartCoroutine(LoadSceneAsync(targetScene));
|
||||
StartCoroutine(LoadSceneAsync(targetScene, onComplete));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -42,7 +42,7 @@ namespace AibisDream
|
||||
/// </summary>
|
||||
/// <param name="targetScene">目标场景</param>
|
||||
/// <returns></returns>
|
||||
public IEnumerator LoadSceneAsync(string targetScene)
|
||||
public IEnumerator LoadSceneAsync(string targetScene, Action onComplete = null)
|
||||
{
|
||||
if (_isLoading)
|
||||
{
|
||||
@@ -79,6 +79,8 @@ namespace AibisDream
|
||||
|
||||
UIManager.Instance.GetPanel<InfoPanel>().HideLoading();
|
||||
_isLoading = false;
|
||||
|
||||
onComplete?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user