75 lines
1.9 KiB
C#
75 lines
1.9 KiB
C#
using System;
|
|
using FairyGUI;
|
|
using Spine.Unity;
|
|
|
|
|
|
namespace LoveLegend
|
|
{
|
|
public class OpenBgUI : BaseUI
|
|
{
|
|
private OpenBgUICtrl ctrl;
|
|
private OpenBgModel model;
|
|
private FGUI.ZM_Img_02.com_loadingBg ui;
|
|
private Action closeCallback;
|
|
|
|
public OpenBgUI(OpenBgUICtrl ctrl) : base(ctrl)
|
|
{
|
|
uiName = UIConst.OpenBgUI;
|
|
this.ctrl = ctrl;
|
|
}
|
|
|
|
protected override void SetUIInfo(UIInfo uiInfo)
|
|
{
|
|
uiInfo.packageName = "ZM_Img_02";
|
|
uiInfo.assetName = "com_loadingBg";
|
|
uiInfo.layerType = UILayerType.Background;
|
|
uiInfo.isNeedOpenAnim = false;
|
|
uiInfo.isNeedCloseAnim = false;
|
|
uiInfo.isNeedUIMask = true;
|
|
}
|
|
|
|
#region 生命周期
|
|
|
|
protected override void OnInit()
|
|
{
|
|
}
|
|
|
|
protected override void OnClose()
|
|
{
|
|
// CommonHelper.FadeOut(ui);
|
|
}
|
|
|
|
protected override void AddListener()
|
|
{
|
|
// UICtrlDispatcher.Instance.AddListener(UICtrlMsg.GameLoginUI_Open, OpenLogin);
|
|
}
|
|
|
|
protected override void RemoveListener()
|
|
{
|
|
// UICtrlDispatcher.Instance.RemoveListener(UICtrlMsg.GameLoginUI_Open, OpenLogin);
|
|
}
|
|
|
|
private void OpenLogin(object args)
|
|
{
|
|
// ui.icon_logo.TweenFade(0, 0.1f);
|
|
}
|
|
|
|
protected override void OnBind()
|
|
{
|
|
ui = baseUI as FGUI.ZM_Img_02.com_loadingBg;
|
|
}
|
|
|
|
protected override void OnOpenBefore(object args)
|
|
{
|
|
var sk = FXManager.Instance.SetFx<SkeletonAnimation>(baseUI.GetChild("bg_parent") as GGraph, Fx_Type.fx_login, ref closeCallback);
|
|
sk.state.SetAnimation(0, "animation", true);
|
|
}
|
|
|
|
protected override void OnOpen(object args)
|
|
{
|
|
// CommonHelper.FadeIn(ui);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
} |