Exemplo n.º 1
0
        private void OnFormClosed(CUIEvent uiEvt)
        {
            Singleton <CBattleSystem> .GetInstance().OnFormClosed();

            this.UnRegisterEvents();
            if (this._heroWrapDict != null)
            {
                this._heroWrapDict.Clear();
                this._heroWrapDict = null;
            }
            if (this._scoreHud != null)
            {
                this._scoreHud.Clear();
                this._scoreHud = null;
            }
            if (this._heroInfoHud != null)
            {
                this._heroInfoHud.Clear();
                this._heroInfoHud = null;
            }
            if (this._replayControl != null)
            {
                this._replayControl.Clear();
                this._replayControl = null;
            }
            this._camp1List      = null;
            this._camp2List      = null;
            this._camp1BaseList  = null;
            this._camp1EquipList = null;
            this._camp2BaseList  = null;
            this._camp2EquipList = null;
            this._hideBtn        = null;
            this._showBtn        = null;
            this._form           = null;
        }
Exemplo n.º 2
0
        public bool OpenForm()
        {
            this._form = Singleton <CUIManager> .GetInstance().OpenForm(WatchForm.GetWatchFormName(), false, true);

            if (null == this._form)
            {
                return(false);
            }
            this._scoreHud = new WatchScoreHud(Utility.FindChild(this._form.gameObject, "ScoreBoard"));
            if (WatchForm.IsNeedShowCampMidInterface())
            {
                this._detailPanel       = this._form.GetWidget(0);
                this._camp1BaseList     = Utility.GetComponetInChild <CUIListScript>(this._detailPanel, "BaseInfoList1");
                this._camp1EquipList    = Utility.GetComponetInChild <CUIListScript>(this._detailPanel, "EquipInfoList1");
                this._camp2BaseList     = Utility.GetComponetInChild <CUIListScript>(this._detailPanel, "BaseInfoList2");
                this._camp2EquipList    = Utility.GetComponetInChild <CUIListScript>(this._detailPanel, "EquipInfoList2");
                this._camp1List         = Utility.FindChild(this._form.gameObject, "CampInfoList_1");
                this._camp2List         = Utility.FindChild(this._form.gameObject, "CampInfoList_2");
                this._camp1BaseSideList = Utility.GetComponetInChild <CUIListScript>(this._camp1List, "BaseInfoList");
                this._camp2BaseSideList = Utility.GetComponetInChild <CUIListScript>(this._camp2List, "BaseInfoList");
            }
            else
            {
                this._camp1List         = Utility.FindChild(this._form.gameObject, "CampInfoList_1");
                this._camp1BaseList     = Utility.GetComponetInChild <CUIListScript>(this._camp1List, "BaseInfoList");
                this._camp1EquipList    = Utility.GetComponetInChild <CUIListScript>(this._camp1List, "EquipInfoList");
                this._camp2List         = Utility.FindChild(this._form.gameObject, "CampInfoList_2");
                this._camp2BaseList     = Utility.GetComponetInChild <CUIListScript>(this._camp2List, "BaseInfoList");
                this._camp2EquipList    = Utility.GetComponetInChild <CUIListScript>(this._camp2List, "EquipInfoList");
                this._camp1BaseSideList = null;
                this._camp2BaseSideList = null;
            }
            this._hideBtn       = Utility.FindChild(this._form.gameObject, "PanelBtn/HideBtn");
            this._showBtn       = Utility.FindChild(this._form.gameObject, "PanelBtn/ShowBtn");
            this.competitionBtn = Utility.FindChild(this._form.gameObject, "PanelBtn/competitionBtn");
            this.competitionBtn.CustomSetActive(Singleton <WatchController> .GetInstance().CanShowActorIRPosMap());
            if (!WatchForm.IsNeedShowCampMidInterface())
            {
                this._heroInfoHud   = new HeroInfoHud(Utility.FindChild(this._form.gameObject, "HeroInfoHud"));
                this._replayControl = new ReplayControl(Utility.FindChild(this._form.gameObject, "ReplayControl"));
            }
            else
            {
                this._heroInfoHud   = null;
                this._replayControl = new ReplayControl(Utility.FindChild(this._form.gameObject, "PanelBtn"));
            }
            return(true);
        }
Exemplo n.º 3
0
        public bool OpenForm()
        {
            this._form = Singleton <CUIManager> .GetInstance().OpenForm(s_watchUIForm, false, true);

            if (null == this._form)
            {
                return(false);
            }
            this._scoreHud       = new WatchScoreHud(Utility.FindChild(this._form.gameObject, "ScoreBoard"));
            this._camp1List      = Utility.FindChild(this._form.gameObject, "CampInfoList_1");
            this._camp1BaseList  = Utility.GetComponetInChild <CUIListScript>(this._camp1List, "BaseInfoList");
            this._camp1EquipList = Utility.GetComponetInChild <CUIListScript>(this._camp1List, "EquipInfoList");
            this._camp2List      = Utility.FindChild(this._form.gameObject, "CampInfoList_2");
            this._camp2BaseList  = Utility.GetComponetInChild <CUIListScript>(this._camp2List, "BaseInfoList");
            this._camp2EquipList = Utility.GetComponetInChild <CUIListScript>(this._camp2List, "EquipInfoList");
            this._hideBtn        = Utility.FindChild(this._form.gameObject, "PanelBtn/HideBtn");
            this._showBtn        = Utility.FindChild(this._form.gameObject, "PanelBtn/ShowBtn");
            this._heroInfoHud    = new HeroInfoHud(Utility.FindChild(this._form.gameObject, "HeroInfoHud"));
            this._replayControl  = new ReplayControl(Utility.FindChild(this._form.gameObject, "ReplayControl"));
            return(true);
        }