private NewbieBannerIntroDialog(string[] imgPath, int imgNum, CUIEvent uieventPars = null, string title = null, string btnName = null, bool bAutoMove = true)
    {
        if (this.m_form != null)
        {
            CUIContainerScript component = this.m_form.GetWidget(2).transform.FindChild("pickObj").GetComponent <CUIContainerScript>();
            this.m_totalImgNum = Math.Min(Math.Min(imgPath.Length, imgNum), component.m_prepareElementAmount);
            this.m_imgPath     = imgPath;
            this.m_evtPars     = uieventPars;
            this.m_title       = title;
            this.m_btnName     = btnName;
            this.m_PickIdxList = new int[this.m_totalImgNum];
            this.m_bAutoMove   = bAutoMove;
            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_ClickPrePage, new CUIEventManager.OnUIEventHandler(this.OnMoveToPrePage));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_ClickNextPage, new CUIEventManager.OnUIEventHandler(this.OnMoveToNextPage));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_DragStart, new CUIEventManager.OnUIEventHandler(this.OnDragStart));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_DragEnd, new CUIEventManager.OnUIEventHandler(this.OnDragEnd));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_Close, new CUIEventManager.OnUIEventHandler(this.OnDialogClose));

            this.InitForm();
            this.InitPickObjElement(this.m_totalImgNum);
            this.RefreshUI(0);
            this.m_TimerSeq = Singleton <CTimerManager> .GetInstance().AddTimer(0x1f40, -1, new CTimer.OnTimeUpHandler(this.AutoMoveBannerImg));

            s_theDialog = this;
        }
    }
Exemple #2
0
    protected override void Initialize()
    {
        CUIEvent uieventPars = new CUIEvent {
            m_eventID = enUIEventID.MatchingExt_BeginFire
        };

        uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_Fire"), out uieventPars.m_eventParams.tagUInt);
        NewbieBannerIntroDialog.Show(new string[] { string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Newbie_Dir, "huokeng1"), string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Newbie_Dir, "huokeng2"), string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Newbie_Dir, "huokeng3") }, 3, uieventPars, null, null, true);
        this.CompleteHandler();
    }
        public override void Init()
        {
            base.Init();
            for (int i = 0; i < this.GuideFormPathList.Length; i++)
            {
                string str = string.Format("Newbie/Form_{0}.prefab", ((EBattleGuideFormType)i).ToString("G"));
                this.GuideFormPathList[i] = "UGUI/Form/System/" + str;
            }
            this.m_BannerIntroDialog = new NewbieBannerIntroDialog();
            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_CloseIntroForm, new CUIEventManager.OnUIEventHandler(this.onCloseIntro));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_CloseIntroForm2, new CUIEventManager.OnUIEventHandler(this.onCloseIntro2));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_CloseGestureGuide, new CUIEventManager.OnUIEventHandler(this.onCloseGesture));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_CloseJoyStickGuide, new CUIEventManager.OnUIEventHandler(this.onCloseJoyStick));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_CloseSettle, new CUIEventManager.OnUIEventHandler(this.onCloseSettle));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_ConfirmAdvanceGuide, new CUIEventManager.OnUIEventHandler(this.EnterAdvanceGuide));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_RejectAdvanceGuide, new CUIEventManager.OnUIEventHandler(this.RejectAdvanceGuide));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_CloseTyrantAlert, new CUIEventManager.OnUIEventHandler(this.onCloseTyrantAlert));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_CloseTyrantTip, new CUIEventManager.OnUIEventHandler(this.onCloseTyrantTip));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_CloseTyrantTip2, new CUIEventManager.OnUIEventHandler(this.onCloseTyrantTip2));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_CloseSkillGesture, new CUIEventManager.OnUIEventHandler(this.onCloseSkillGesture));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_OldPlayerFirstFormClose, new CUIEventManager.OnUIEventHandler(this.onOldPlayerFirstFormClose));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_ClickPrePage, new CUIEventManager.OnUIEventHandler(this.OnClickToPrePage));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_ClickNextPage, new CUIEventManager.OnUIEventHandler(this.OnClickToNextPage));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_DragStart, new CUIEventManager.OnUIEventHandler(this.OnDragStart));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_DragEnd, new CUIEventManager.OnUIEventHandler(this.OnDragEnd));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_ClickConfirm, new CUIEventManager.OnUIEventHandler(this.OnDialogClickConfirm));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_Close, new CUIEventManager.OnUIEventHandler(this.OnDialogClose));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_OnMoveTimeUp, new CUIEventManager.OnUIEventHandler(this.onMoveTimeUp));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_ClickVictoryTips, new CUIEventManager.OnUIEventHandler(this.onClickVictoryTips));
        }
    private void OnDialogClose(CUIEvent uiEvt)
    {
        Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Newbie_BannerIntroDlg_ClickPrePage, new CUIEventManager.OnUIEventHandler(this.OnMoveToPrePage));

        Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Newbie_BannerIntroDlg_ClickNextPage, new CUIEventManager.OnUIEventHandler(this.OnMoveToNextPage));

        Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Newbie_BannerIntroDlg_DragStart, new CUIEventManager.OnUIEventHandler(this.OnDragStart));

        Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Newbie_BannerIntroDlg_DragEnd, new CUIEventManager.OnUIEventHandler(this.OnDragEnd));

        Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Newbie_BannerIntroDlg_Close, new CUIEventManager.OnUIEventHandler(this.OnDialogClose));

        Singleton <CTimerManager> .GetInstance().RemoveTimer(new CTimer.OnTimeUpHandler(this.AutoMoveBannerImg));

        if (this.m_evtPars != null)
        {
            Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(this.m_evtPars);
        }
        s_theDialog = null;
        this.m_form = null;
    }
 public static void Show(string[] imgPath, int imgNum, CUIEvent uieventPars = null, string title = null, string btnName = null, bool bAutoMove = true)
 {
     s_theDialog = new NewbieBannerIntroDialog(imgPath, imgNum, uieventPars, title, btnName, bAutoMove);
 }