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((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject); TypeEventSystem.Global.Register(arg => Show()).UnRegisterWhenGameObjectDestroyed(gameObject); TypeEventSystem.Global.Register((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject); } protected override void OnOpen(IUIData uiData = null) { Icon.GetComponent().DORestart(); } protected override void OnShow() { } protected override void OnHide() { } protected override void OnClose() { } } }