2024-12-14 18:27:59 +08:00

41 lines
969 B
C#

using UnityEngine;
using UnityEngine.UI;
using QFramework;
using DG.Tweening;
using System;
namespace QFramework.Example
{
public class UILoadingData : UIPanelData
{
}
public partial class UILoading : UIPanel
{
protected override void OnInit(IUIData uiData = null)
{
mData = uiData as UILoadingData ?? new UILoadingData();
TypeEventSystem.Global.Register<OnLoadingShow>(arg => Show()).UnRegisterWhenGameObjectDestroyed(gameObject);
TypeEventSystem.Global.Register<OnLoadingHide>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
}
protected override void OnOpen(IUIData uiData = null)
{
Icon.GetComponent<DOTweenAnimation>().DORestart();
}
protected override void OnShow()
{
}
protected override void OnHide()
{
}
protected override void OnClose()
{
}
}
}