NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/Utils.UI.cs

29 lines
1009 B
C#

using System.Threading.Tasks;
using Cysharp.Threading.Tasks;
namespace Gameplay.UI
{
public partial class Utils
{
public static async UniTask ShowLoadingUI(E_LoadingType type, bool closeOthers)
{
switch (type)
{
case E_LoadingType.Login:
{
UIWindow ui = await UI_LoadingProgressInterfaceController.Open();
if (closeOthers && ui != null)
UIManager.Instance.CloseAllNormalExcept(UINameConst.UI_LoadingProgressInterface, false);
}
break;
default:
{
UIWindow ui = await UI_LoadingInterfaceController.Open();
if (closeOthers && ui != null)
UIManager.Instance.CloseAllNormalExcept(UINameConst.UI_LoadingInterface, false);
}
break;
}
}
}
}