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

29 lines
981 B
C#
Raw Normal View History

2024-01-10 14:31:25 +08:00
using System.Threading.Tasks;
using Cysharp.Threading.Tasks;
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)
{
case E_LoadingType.EnterGame:
{
UIWindow ui = await UI_LoadingProgressInterfaceController.Open();
if (closeOthers && ui != null)
UIManager.Instance.CloseAllNormalExcept(UINameConst.UI_LoadingProgressInterface);
}
break;
default:
{
UIWindow ui = await UI_LoadingController.Open();
if (closeOthers && ui != null)
UIManager.Instance.CloseAllNormalExcept(UINameConst.UI_Loading);
}
break;
}
2024-01-10 14:31:25 +08:00
}
}
}