23 lines
682 B
C#
23 lines
682 B
C#
using System.Threading.Tasks;
|
|
using Cysharp.Threading.Tasks;
|
|
|
|
namespace Gameplay.UI
|
|
{
|
|
public partial class Utils
|
|
{
|
|
public static async UniTask ShowLoadingUI(bool closeOthers)
|
|
{
|
|
var ui = await UIManager.Instance.OpenWindow(UINameConst.UI_Loading) as UI_LoadingController;
|
|
if (closeOthers && ui != null)
|
|
{
|
|
UIManager.Instance.ForeachUI(delegate(UIWindow window)
|
|
{
|
|
if (window != null && window != ui)
|
|
{
|
|
window.CloseWindow(UIWindowCloseType.HideAndDestroy);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
} |