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

31 lines
1.0 KiB
C#
Raw Normal View History

2024-01-10 14:31:25 +08:00
using System.Threading.Tasks;
using Cysharp.Threading.Tasks;
2024-08-28 17:03:50 +08:00
using Gameplay.SubSystems;
2024-01-10 14:31:25 +08:00
namespace Gameplay.UI
{
public partial class Utils
{
2024-07-11 16:15:45 +08:00
public static async UniTask ShowLoadingUI(E_LoadingType type, bool closeOthers)
2024-01-10 14:31:25 +08:00
{
2024-07-11 16:15:45 +08:00
switch (type)
{
2024-07-12 15:21:16 +08:00
case E_LoadingType.Login:
2024-07-11 16:15:45 +08:00
{
await UI_LoadingProgressInterfaceController.Open();
if (closeOthers)
2024-08-12 19:31:50 +08:00
UIManager.Instance.CloseAllNormalExcept(UINameConst.UI_LoadingProgressInterface, false);
2024-07-11 16:15:45 +08:00
}
break;
2024-08-28 17:03:50 +08:00
case E_LoadingType.CommonLoading:
2024-07-11 16:15:45 +08:00
default:
{
await UI_LoadingInterfaceController.Open();
if (closeOthers)
2024-08-12 19:31:50 +08:00
UIManager.Instance.CloseAllNormalExcept(UINameConst.UI_LoadingInterface, false);
2024-07-11 16:15:45 +08:00
}
break;
}
2024-01-10 14:31:25 +08:00
}
}
}