using System; using DG.Tweening; using FGUI.P05_Login; using UnityEngine; namespace FlowerPower { public class TipsViewUI : BaseUI { private TipsViewUICtrl ctrl; private TipsViewModel model; private FGUI.P01_Common.com_tips2 ui; public TipsViewUI(TipsViewUICtrl ctrl) : base(ctrl) { uiName = UIConst.TipsViewUI; this.ctrl = ctrl; } protected override void SetUIInfo(UIInfo uiInfo) { uiInfo.packageName = "P01_Common"; uiInfo.assetName = "com_tips2"; uiInfo.layerType = UILayerType.Loading; uiInfo.isNeedOpenAnim = false; uiInfo.isNeedCloseAnim = false; uiInfo.isNeedUIMask = true; } protected override void OnInit() { } protected override void OnClose() { CommonHelper.FadeOut(ui); } protected override void OnBind() { ui = baseUI as FGUI.P01_Common.com_tips2; } protected override void OnOpenBefore(object args) { if (args != null) { InitView((Action)args); } GameDispatcher.Instance.Dispatch(GameMsg.netLoading_close); } protected override void OnOpen(object args) { CommonHelper.FadeIn(ui); } protected override void AddListener() { } protected override void RemoveListener() { } private void InitView(Action callback) { ui.btn_relog.SetClick(()=>{ callback?.Invoke(); CtrlCloseUI(); }); } } }