using BingoBrain.Core;
using FGUI.ABigImg;

namespace BingoBrain
{
    public class BottomUI : BaseUI
    {
        private BottomUICtrl ctrl;
        private BottomModel model;
        private com_mainbg ui;

        public BottomUI(BottomUICtrl ctrl) : base(ctrl)
        {
            uiName = UIConst.BottomUI;
            this.ctrl = ctrl;
        }

        protected override void SetUIInfo(UIInfo uiInfo)
        {
            uiInfo.packageName = "ABigImg";
            uiInfo.assetName = "com_mainbg";
            uiInfo.layerType = UILayerType.Background;
            uiInfo.isNeedOpenAnim = false;
            uiInfo.isNeedCloseAnim = true;
            uiInfo.isNeedUIMask = false;
        }

        #region 生命周期

        protected override void OnInit()
        {
        }

        protected override void OnClose()
        {
            GlobalHarmony.Out(ui);
        }

        protected override void OnBind()
        {
            ui = baseUI as com_mainbg;
        }

        protected override void OnOpenBefore(object args)
        {
        }

        protected override void OnOpen(object args)
        {
            GlobalHarmony.In(ui);
        }

        #endregion
    }
}