36 lines
869 B
C#
36 lines
869 B
C#
using Cysharp.Threading.Tasks;
|
|
using Framework;
|
|
using PhxhSDK;
|
|
|
|
/// <summary>
|
|
/// 转场管理
|
|
/// </summary>
|
|
public class TransitionManager : Singlenton<TransitionManager>, IInitable
|
|
{
|
|
private bool _show;
|
|
|
|
public void Init()
|
|
{
|
|
EventManager.Instance.Register(EventManager.EventName.TransitionShowEnd, EndShow);
|
|
}
|
|
|
|
public async UniTask OpenNormalTransitionUI()
|
|
{
|
|
await UIManager.Instance.CreateAndOpenWindow(UINameConst.UI_TransitionNormal);
|
|
}
|
|
|
|
public void ReadyShowNormalTransition()
|
|
{
|
|
EventManager.Instance.Send(EventManager.EventName.TransitionShowStart);
|
|
}
|
|
|
|
public void EndShow()
|
|
{
|
|
UIManager.Instance.CloseWindow(UINameConst.UI_TransitionNormal);
|
|
}
|
|
|
|
public void Release()
|
|
{
|
|
EventManager.Instance.Unregister(EventManager.EventName.TransitionShowEnd, EndShow);
|
|
}
|
|
} |