Пример #1
0
        /// <summary>
        /// 多个按钮触发的弹出框
        /// </summary>
        /// <param name="desc"></param>
        /// <param name="btnList"></param>
        /// <param name="parent"></param>
        /// <returns></returns>
        public GameObject MorBtnNoticeShow(string desc, List <BtnInfoItem> btnList, GameObject parent = null)
        {
            UINoticeModel tmpNotModel = new UINoticeModel();

            tmpNotModel.btnList    = btnList;
            tmpNotModel.NoticeInfo = desc;


            GameObject notic = CreatNotice(parent, GameAssetsPath.SceneUI_MorBtnNotice_Path);

            notic.name = notic.name.Replace("(Clone)", "");

            UIMorBtnNotice textNotic = notic.GetComponent <UIMorBtnNotice>();

            textNotic.Model = tmpNotModel;
            textNotic.Init();

            return(notic);
        }
Пример #2
0
        /// <summary>
        ///  文本弹出框
        /// </summary>
        /// <param name="desc"> 文本信息 </param>
        /// <param name="_times"> 时间 一定时间消失(默认5s)</param>
        /// <param name="parent"> 弹出根目录 </param>
        /// <returns></returns>
        public GameObject TextNoticeShow(string desc, System.Action <System.Object> normalFinishBack = null, int _times = 2, GameObject parent = null)
        {
            UINoticeModel tmpNotModel = new UINoticeModel();

            tmpNotModel.NormalFinish = normalFinishBack;
            tmpNotModel.normalTime   = _times;
            tmpNotModel.NoticeInfo   = desc;


            GameObject notic = CreatNotice(parent, GameAssetsPath.SceneUI_TextNotice_Path);

            notic.name = notic.name.Replace("(Clone)", "");

            UITextNotice textNotic = notic.GetComponent <UITextNotice>();

            textNotic.Model = tmpNotModel;
            textNotic.Init();

            return(notic);
        }
Пример #3
0
        /// <summary>
        /// 有一个按钮触发的弹出框
        /// </summary>
        /// <param name="desc"></param>
        /// <param name="parent"></param>
        /// <returns></returns>
        public GameObject OneBtnNoticeShow(string desc, string btnName, System.Action <System.Object> oneBtnBack = null, System.Object evt = null, GameObject parent = null)
        {
            UINoticeModel tmpNotModel = new UINoticeModel();

            tmpNotModel.NoticeInfo = desc;
            tmpNotModel.OneBtnName = btnName;
            tmpNotModel.OneBtnBack = oneBtnBack;
            tmpNotModel.Evt        = evt;

            GameObject notic = CreatNotice(parent, GameAssetsPath.SceneUI_OneBtnNotice_Path);

            notic.name = notic.name.Replace("(Clone)", "");

            UIOneBtnNotice textNotic = notic.GetComponent <UIOneBtnNotice>();

            textNotic.Model = tmpNotModel;
            textNotic.Init();

            return(notic);
        }