Ejemplo n.º 1
0
        public void OnOpenHeroViewForm(CUIEvent uiEvent)
        {
            CUIFormScript script = Singleton <CUIManager> .GetInstance().OpenForm(s_heroViewFormPath, false, true);

            if (script != null)
            {
                this.m_selectHeroType = enHeroJobType.All;
                string text = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_All");

                string str2 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Tank");

                string str3 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Soldier");

                string str4 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Assassin");

                string str5 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Master");

                string str6 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Archer");

                string str7 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Aid");

                string[] titleList = new string[] { text, str2, str3, str4, str5, str6, str7 };
                CUICommonSystem.InitMenuPanel(script.transform.Find("Panel_Menu/List").gameObject, titleList, (int)this.m_selectHeroType);
                this.ResetHeroListData();
            }
        }
Ejemplo n.º 2
0
        private void OpenSymbolForm()
        {
            MonoSingleton <NewbieGuideManager> .GetInstance().SetNewbieBit(14, true, false);

            CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CSymbolSystem.s_symbolFormPath, false, true);

            if (cUIFormScript != null)
            {
                string text = Singleton <CTextManager> .GetInstance().GetText("Symbol_Sheet_Symbol");

                string text2 = Singleton <CTextManager> .GetInstance().GetText("SymbolRcmd_Tab");

                string text3 = Singleton <CTextManager> .GetInstance().GetText("Symbol_Sheet_Make");

                string[] titleList = new string[]
                {
                    text,
                    text2,
                    text3
                };
                GameObject widget = cUIFormScript.GetWidget(0);
                CUICommonSystem.InitMenuPanel(widget, titleList, (int)this.m_selectMenuType, true);
                CUIListScript component = widget.GetComponent <CUIListScript>();
                this.m_symbolWearCtrl.m_symbolPageOpenSrc = enSymbolPageOpenSrc.enSymbol;
            }
        }
        private void OnOpenChangeHeroForm(CUIEvent uiEvent)
        {
            CUIFormScript script = Singleton <CUIManager> .GetInstance().OpenForm(s_ChooseHeroPath, false, true);

            if (null != script)
            {
                this.m_curHeroJob = enHeroJobType.All;
                GameObject widget = script.GetWidget(0);
                if (widget != null)
                {
                    GameObject obj3 = script.GetWidget(1);
                    if (obj3 != null)
                    {
                        obj3.GetComponent <Toggle>().isOn = this.m_bOwnHeroFlag;
                    }
                    string text = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_All");

                    string str2 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Tank");

                    string str3 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Soldier");

                    string str4 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Assassin");

                    string str5 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Master");

                    string str6 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Archer");

                    string str7 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Aid");

                    string[] titleList = new string[] { text, str2, str3, str4, str5, str6, str7 };
                    CUICommonSystem.InitMenuPanel(widget, titleList, (int)this.m_curHeroJob);
                }
            }
        }
Ejemplo n.º 4
0
        public void Draw(CUIFormScript form)
        {
            if (form != null)
            {
                GameObject gameObject = form.transform.Find("pnlBodyBg/pnlBuyHero").gameObject;
                if (gameObject != null)
                {
                    gameObject.CustomSetActive(true);
                    this.m_heroJobType = enHeroJobType.All;
                    string text = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_All");

                    string str2 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Tank");

                    string str3 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Soldier");

                    string str4 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Assassin");

                    string str5 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Master");

                    string str6 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Archer");

                    string str7 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Aid");

                    string[] titleList = new string[] { text, str2, str3, str4, str5, str6, str7 };
                    CUICommonSystem.InitMenuPanel(gameObject.transform.Find("MenuList").gameObject, titleList, (int)this.m_heroJobType);
                }
            }
        }
Ejemplo n.º 5
0
        private void OpenSymbolForm()
        {
            MonoSingleton <NewbieGuideManager> .GetInstance().SetNewbieBit(14, true, false);

            CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CSymbolSystem.s_symbolFormPath, false, true);

            if (cUIFormScript != null)
            {
                string text = Singleton <CTextManager> .GetInstance().GetText("Symbol_Sheet_Symbol");

                string text2 = Singleton <CTextManager> .GetInstance().GetText("SymbolRcmd_Tab");

                string text3 = Singleton <CTextManager> .GetInstance().GetText("Symbol_Sheet_Make");

                string[] titleList = new string[]
                {
                    text,
                    text2,
                    text3
                };
                GameObject widget = cUIFormScript.GetWidget(0);
                CUICommonSystem.InitMenuPanel(widget, titleList, (int)this.m_selectMenuType, true);
                CUIListScript component = widget.GetComponent <CUIListScript>();
                Singleton <CUINewFlagSystem> .GetInstance().AddNewFlag(component.GetElemenet(1).gameObject, enNewFlagKey.New_BtnSymbolFlagKey_V1, enNewFlagPos.enTopRight, 1f, 0f, 0f, enNewFlagType.enNewFlag);
            }
        }
Ejemplo n.º 6
0
        public void SwitchToSymbolRcmdPanel(CUIFormScript form)
        {
            if (form == null || form.IsClosed())
            {
                return;
            }
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                DebugHelper.Assert(false, "SwitchToSymbolRcmdPanel role is null");
                return;
            }
            this.m_curHeroId       = masterRoleInfo.m_symbolInfo.m_selSymbolRcmdHeroId;
            this.m_symbolRcmdLevel = masterRoleInfo.m_symbolInfo.m_selSymbolRcmdLevel;
            this.m_symbolRcmdLevel = (ushort)Math.Max(1, Math.Min((int)this.m_symbolRcmdLevel, CSymbolInfo.s_maxSymbolLevel));
            CSymbolSystem.RefreshSymbolCntText(true);
            this.RefreshSymbolRcmdPanel();
            string[] titleList = new string[]
            {
                "1",
                "2",
                "3",
                "4",
                "5"
            };
            GameObject listObj = Utility.FindChild(form.gameObject, "SymbolRecommend/Panel_SymbolRecommend/Panel_SymbolLevel/levelList");

            CUICommonSystem.InitMenuPanel(listObj, titleList, (int)(this.m_symbolRcmdLevel - 1), true);
        }
Ejemplo n.º 7
0
        public void Show()
        {
            this.m_FormScript = Singleton <CUIManager> .GetInstance().OpenForm(s_battleHeroInfoForm, false, true);

            if ((this.m_FormScript != null) && (Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer() != null))
            {
                PoolObjHandle <ActorRoot> captain = Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer().Captain;

                if (captain != 0)
                {
                    GameObject listObj = this.m_FormScript.m_formWidgets[3];
                    if (listObj == null)
                    {
                        return;
                    }
                    string[] titleList = new string[] { Singleton <CTextManager> .GetInstance().GetText("BattleHeroInfo_Property"), Singleton <CTextManager> .GetInstance().GetText("BattleHeroInfo_Skill") };
                    CUICommonSystem.InitMenuPanel(listObj, titleList, 0);
                    this.ShowHero(captain);
                    this.RefreshPropPanel(this.m_FormScript.gameObject, ref captain);
                    this.OnSkillTipsShow();
                    this.m_FormScript.m_formWidgets[2].CustomSetActive(true);
                    this.m_FormScript.m_formWidgets[1].CustomSetActive(false);
                }
                Singleton <CUIParticleSystem> .instance.Hide(null);
            }
        }
Ejemplo n.º 8
0
        public static void OpenHeroChooseForm()
        {
            enHeroJobType all    = enHeroJobType.All;
            CUIFormScript script = Singleton <CUIManager> .GetInstance().OpenForm(s_ChooseHeroPath, false, true);

            GameObject widget  = script.GetWidget(2);
            GameObject listObj = script.GetWidget(0);

            if (listObj != null)
            {
                Utility.GetComponetInChild <CUIListElementScript>(widget, "ScrollRect/Content/ListElement_Template").m_onEnableEventID = enUIEventID.Ranking_HeroChg_Hero_Item_Enable;
            }
            if (listObj != null)
            {
                script.GetWidget(1).CustomSetActive(false);
                string text = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_All");

                string str2 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Tank");

                string str3 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Soldier");

                string str4 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Assassin");

                string str5 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Master");

                string str6 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Archer");

                string str7 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Aid");

                string[] titleList = new string[] { text, str2, str3, str4, str5, str6, str7 };
                CUICommonSystem.InitMenuPanel(listObj, titleList, (int)all);
                listObj.GetComponent <CUIListScript>().m_listSelectChangedEventID = enUIEventID.Ranking_HeroChg_Title_Click;
            }
        }
Ejemplo n.º 9
0
        public void OnOpenHeroViewForm(CUIEvent uiEvent)
        {
            CUICommonSystem.ResetLobbyFormFadeRecover();
            CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CHeroOverviewSystem.s_heroViewFormPath, false, true);

            if (cUIFormScript == null)
            {
                return;
            }
            Singleton <CLobbySystem> .GetInstance().SetTopBarPriority(enFormPriority.Priority0);

            this.m_selectHeroType = enHeroJobType.All;
            CMallSortHelper.CreateHeroViewSorter().SetSortType(this.m_heroSortType);
            this.ResetHeroListData(true);
            string text = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_All");

            string text2 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Tank");

            string text3 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Soldier");

            string text4 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Assassin");

            string text5 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Master");

            string text6 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Archer");

            string text7 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Aid");

            string[] titleList = new string[]
            {
                text,
                text2,
                text3,
                text4,
                text5,
                text6,
                text7
            };
            GameObject gameObject = cUIFormScript.transform.Find("Panel_Menu/List").gameObject;

            CUICommonSystem.InitMenuPanel(gameObject, titleList, (int)this.m_selectHeroType, true);
            this.RefreshHeroOwnFlag();
            this.ResetHeroSortTypeList();
            GameObject widget = cUIFormScript.GetWidget(4);

            Singleton <CUINewFlagSystem> .instance.AddNewFlag(widget, enNewFlagKey.New_HeroOverViewOpenStoryUrl_V14, enNewFlagPos.enTopRight, 0.8f, 0f, 0f, enNewFlagType.enNewFlag);

            CMiShuSystem.SendUIClickToServer(enUIClickReprotID.rp_HeroListBtn);
            if (CSysDynamicBlock.bLobbyEntryBlocked)
            {
                Transform transform = cUIFormScript.transform.FindChild("Panel_Hero/Panel_Hero_TitleBg/BtnStoryWeb");
                if (transform != null)
                {
                    transform.gameObject.CustomSetActive(false);
                }
            }
        }
Ejemplo n.º 10
0
        public void Init()
        {
            if (Singleton <CUIManager> .GetInstance().GetForm(s_battleStateViewUIForm) == null)
            {
                CUIFormScript script = Singleton <CUIManager> .GetInstance().OpenForm(s_battleStateViewUIForm, false, true);

                this._root = script.gameObject.transform.Find("BattleStatView").gameObject;
                if (this._root != null)
                {
                    this._heroList0    = new HeroItem[5];
                    this._heroList1    = new HeroItem[5];
                    this.heroView      = Utility.FindChild(this._root, "HeroView");
                    this.matchInfo     = Utility.FindChild(this._root, "BattleMatchInfo");
                    this.valueInfo     = Utility.FindChild(this._root, "HeroValueInfo");
                    this.sortByCoinBtn = Utility.FindChild(this._root, "SortByCoin");
                    CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo();

                    if (masterRoleInfo != null)
                    {
                        this.m_sortByCoin = PlayerPrefs.GetInt(string.Format("Sgmae_Battle_SortByCoin_{0}", masterRoleInfo.playerUllUID)) > 0;
                    }
                    this.UpdateSortBtn();
                    if (((this.heroView != null) && (this.matchInfo != null)) && (this.valueInfo != null))
                    {
                        for (int i = 0; i < 5; i++)
                        {
                            this._heroList0[i] = new HeroItem(Utility.FindChild(this.heroView, "HeroList_0/" + i), Utility.FindChild(this.matchInfo, "HeroList_0/" + i), Utility.FindChild(this.valueInfo, "HeroList_0/" + i));
                            this._heroList1[i] = new HeroItem(Utility.FindChild(this.heroView, "HeroList_1/" + i), Utility.FindChild(this.matchInfo, "HeroList_1/" + i), Utility.FindChild(this.valueInfo, "HeroList_1/" + i));
                        }
                        GameObject gameObject = script.gameObject.transform.Find("TopCommon/Panel_Menu/ListMenu").gameObject;
                        if (gameObject != null)
                        {
                            this.list = gameObject.GetComponent <CUIListScript>();
                            string[] titleList = new string[] { Singleton <CTextManager> .GetInstance().GetText("BattleStateView_MatchInfo"), Singleton <CTextManager> .GetInstance().GetText("BattleStateView_HeroInfo") };
                            CUICommonSystem.InitMenuPanel(gameObject, titleList, 0);
                            this.heroView.CustomSetActive(true);
                            this.matchInfo.CustomSetActive(true);
                            this.valueInfo.CustomSetActive(false);
                            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Battle_CloseStatView, new CUIEventManager.OnUIEventHandler(this.onCloseClick));

                            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BattleMatchInfo_InfoTypeChange, new CUIEventManager.OnUIEventHandler(this.OnBttleMatchInfoTabChange));

                            Singleton <EventRouter> .instance.AddEventHandler(EventID.BATTLE_KDA_CHANGED, new System.Action(this.OnBattleKDAChanged));

                            Singleton <EventRouter> .instance.AddEventHandler(EventID.BATTLE_HERO_PROPERTY_CHANGED, new System.Action(this.OnBattleHeroPropertyChange));

                            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Battle_BattleStatViewSortClick, new CUIEventManager.OnUIEventHandler(this.OnSortClick));

                            this.Hide();
                        }
                    }
                }
            }
        }
Ejemplo n.º 11
0
        public static void InitRankGodDetailTab()
        {
            CUIFormScript form = Singleton <CUIManager> .instance.GetForm(RankingSystem.s_rankingGodDetailForm);

            if (form != null)
            {
                GameObject    p               = Utility.FindChild(form.GetWidget(0), "TitleTab");
                string[]      titleList       = new string[] { Singleton <CTextManager> .instance.GetText("Ranking_God_Tips_3"), Singleton <CTextManager> .instance.GetText("Ranking_God_Tips_4") };
                CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(p, "TitleTab");
                CUICommonSystem.InitMenuPanel(p, titleList, 0);
            }
        }
Ejemplo n.º 12
0
        public static void OpenHeroChooseForm()
        {
            enHeroJobType selectIndex   = enHeroJobType.All;
            CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(RankingView.s_ChooseHeroPath, false, true);

            GameObject widget  = cUIFormScript.GetWidget(2);
            GameObject widget2 = cUIFormScript.GetWidget(0);

            if (widget2 != null)
            {
                CUIListElementScript componetInChild = Utility.GetComponetInChild <CUIListElementScript>(widget, "ScrollRect/Content/ListElement_Template");
                componetInChild.m_onEnableEventID = enUIEventID.Ranking_HeroChg_Hero_Item_Enable;
            }
            if (widget2 != null)
            {
                GameObject widget3 = cUIFormScript.GetWidget(1);
                widget3.CustomSetActive(false);
                string text = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_All");

                string text2 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Tank");

                string text3 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Soldier");

                string text4 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Assassin");

                string text5 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Master");

                string text6 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Archer");

                string text7 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Aid");

                string[] titleList = new string[]
                {
                    text,
                    text2,
                    text3,
                    text4,
                    text5,
                    text6,
                    text7
                };
                CUICommonSystem.InitMenuPanel(widget2, titleList, (int)selectIndex, true);
                CUIListScript component = widget2.GetComponent <CUIListScript>();
                component.m_listSelectChangedEventID = enUIEventID.Ranking_HeroChg_Title_Click;
            }
        }
        public void InitUI()
        {
            CUIFormScript form = Singleton <CUIManager> .instance.GetForm(CPlayerInfoSystem.sPlayerInfoFormPath);

            if (form == null)
            {
                return;
            }
            GameObject    widget           = form.GetWidget(2);
            CUIListScript componetInChild  = Utility.GetComponetInChild <CUIListScript>(widget, "panelTop/MenuList");
            CUIListScript componetInChild2 = Utility.GetComponetInChild <CUIListScript>(widget, "panelTop/DropList/List");

            CUICommonSystem.InitMenuPanel(componetInChild.gameObject, CPlayerPvpInfoController.sMainTitles, 0, true);
            CUICommonSystem.InitMenuPanel(componetInChild2.gameObject, CPlayerPvpInfoController.sSubTitles, CPlayerPvpInfoController.CacheSubTab, true);
            Utility.FindChild(widget, "btnGraph").CustomSetActive(false);
            Utility.FindChild(widget, "btnDetail").CustomSetActive(true);
        }
Ejemplo n.º 14
0
        private void OnOpenChangeHeroForm(CUIEvent uiEvent)
        {
            CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CSymbolRecommendController.s_ChooseHeroPath, false, true);

            if (null == cUIFormScript)
            {
                return;
            }
            this.m_curHeroJob = enHeroJobType.All;
            GameObject widget = cUIFormScript.GetWidget(0);

            if (widget != null)
            {
                GameObject widget2 = cUIFormScript.GetWidget(1);
                if (widget2 != null)
                {
                    widget2.GetComponent <Toggle>().isOn = this.m_bOwnHeroFlag;
                }
                string text = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_All");

                string text2 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Tank");

                string text3 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Soldier");

                string text4 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Assassin");

                string text5 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Master");

                string text6 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Archer");

                string text7 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Aid");

                string[] titleList = new string[]
                {
                    text,
                    text2,
                    text3,
                    text4,
                    text5,
                    text6,
                    text7
                };
                CUICommonSystem.InitMenuPanel(widget, titleList, (int)this.m_curHeroJob, true);
            }
        }
Ejemplo n.º 15
0
        public void RefreshSymbolMakeForm()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CSymbolSystem.s_symbolFormPath);

            if (form != null)
            {
                CTextManager instance = Singleton <CTextManager> .GetInstance();

                string[] titleList = new string[] { instance.GetText("Symbol_Prop_Tab_All"), instance.GetText("Symbol_Prop_Tab_Atk"), instance.GetText("Symbol_Prop_Tab_Hp"), instance.GetText("Symbol_Prop_Tab_Defense"), instance.GetText("Symbol_Prop_Tab_Function"), instance.GetText("Symbol_Prop_Tab_HpSteal"), instance.GetText("Symbol_Prop_Tab_AtkSpeed"), instance.GetText("Symbol_Prop_Tab_Crit"), instance.GetText("Symbol_Prop_Tab_Penetrate") };
                CUICommonSystem.InitMenuPanel(form.GetWidget(4), titleList, (int)this.m_symbolFilterType);
                string[] strArray2 = new string[] { "1", "2", "3", "4", "5" };
                CUICommonSystem.InitMenuPanel(form.GetWidget(5), strArray2, this.m_symbolFilterLevel - 1);
                this.m_symbolSys.SetSymbolData();
                this.SetSymbolMakeListData();
                this.RefreshSymbolMakeList(form);
                form.GetWidget(7).GetComponent <Text>().text = this.GetBreakExcessSymbolCoinCnt(0xffff).ToString();
            }
        }
Ejemplo n.º 16
0
        public void OnOpenHeroViewForm(CUIEvent uiEvent)
        {
            CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CHeroOverviewSystem.s_heroViewFormPath, false, true);

            if (cUIFormScript == null)
            {
                return;
            }
            Singleton <CLobbySystem> .GetInstance().SetTopBarPriority(enFormPriority.Priority0);

            this.m_selectHeroType = enHeroJobType.All;
            CMallSortHelper.CreateHeroViewSorter().SetSortType(this.m_heroSortType);
            this.ResetHeroListData(true);
            string text = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_All");

            string text2 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Tank");

            string text3 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Soldier");

            string text4 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Assassin");

            string text5 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Master");

            string text6 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Archer");

            string text7 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Aid");

            string[] titleList = new string[]
            {
                text,
                text2,
                text3,
                text4,
                text5,
                text6,
                text7
            };
            GameObject gameObject = cUIFormScript.transform.Find("Panel_Menu/List").gameObject;

            CUICommonSystem.InitMenuPanel(gameObject, titleList, (int)this.m_selectHeroType, true);
            this.RefreshHeroOwnFlag();
            this.ResetHeroSortTypeList();
            CMiShuSystem.SendUIClickToServer(enUIClickReprotID.rp_HeroListBtn);
        }
        public void Draw(CUIFormScript form)
        {
            if (form == null)
            {
                return;
            }
            GameObject gameObject = form.transform.Find("pnlBodyBg/pnlBuyHero").gameObject;

            if (gameObject != null)
            {
                gameObject.CustomSetActive(true);
                this.m_heroJobType = enHeroJobType.All;
                string text = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_All");

                string text2 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Tank");

                string text3 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Soldier");

                string text4 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Assassin");

                string text5 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Master");

                string text6 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Archer");

                string text7 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Aid");

                string[] titleList = new string[]
                {
                    text,
                    text2,
                    text3,
                    text4,
                    text5,
                    text6,
                    text7
                };
                Transform transform = gameObject.transform.Find("MenuList");
                this.RefreshHeroOwnFlag();
                CUICommonSystem.InitMenuPanel(transform.gameObject, titleList, (int)this.m_heroJobType, true);
            }
        }
Ejemplo n.º 18
0
        private void OpenSymbolForm()
        {
            MonoSingleton <NewbieGuideManager> .GetInstance().SetNewbieBit(14, true, false);

            CUIFormScript script = Singleton <CUIManager> .GetInstance().OpenForm(s_symbolFormPath, false, true);

            if (script != null)
            {
                string text = Singleton <CTextManager> .GetInstance().GetText("Symbol_Sheet_Symbol");

                string str2 = Singleton <CTextManager> .GetInstance().GetText("SymbolRcmd_Tab");

                string str3 = Singleton <CTextManager> .GetInstance().GetText("Symbol_Sheet_Make");

                string[]   titleList = new string[] { text, str2, str3 };
                GameObject widget    = script.GetWidget(0);
                CUICommonSystem.InitMenuPanel(widget, titleList, (int)this.m_selectMenuType);
                CUIListScript component = widget.GetComponent <CUIListScript>();
                Singleton <CMiShuSystem> .GetInstance().ShowNewFlag(component.GetElemenet(1).gameObject, enNewFlagKey.New_BtnSymbolFlagKey_V1);
            }
        }
Ejemplo n.º 19
0
        public void SwitchToSymbolRcmdPanel(CUIEvent uiEvent)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                DebugHelper.Assert(false, "SwitchToSymbolRcmdPanel role is null");
            }
            else
            {
                this.m_curHeroId       = masterRoleInfo.m_symbolInfo.m_selSymbolRcmdHeroId;
                this.m_symbolRcmdLevel = masterRoleInfo.m_symbolInfo.m_selSymbolRcmdLevel;
                this.m_symbolRcmdLevel = (ushort)Math.Max(1, Math.Min(this.m_symbolRcmdLevel, CSymbolInfo.s_maxSymbolLevel));
                CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CSymbolSystem.s_symbolFormPath);

                if (null != form)
                {
                    CSymbolSystem.RefreshSymbolCntText();
                    this.RefreshSymbolRcmdPanel();
                    string[] titleList = new string[] { "1", "2", "3", "4", "5" };
                    CUICommonSystem.InitMenuPanel(form.GetWidget(11), titleList, this.m_symbolRcmdLevel - 1);
                }
            }
        }
        public void OpenForm()
        {
            CUIFormScript cUIFormScript = Singleton <CUIManager> .get_instance().OpenForm(CPlayerCommonHeroInfoController.sPlayerInfoCommonHeroFormPath, false, true);

            if (cUIFormScript == null)
            {
                return;
            }
            CPlayerProfile profile = Singleton <CPlayerInfoSystem> .get_instance().GetProfile();

            GameObject widget = cUIFormScript.GetWidget(0);

            if (widget == null)
            {
                return;
            }
            this.m_lastSortIndex = -1;
            this.m_lastIsUp      = 0;
            CUIListScript componetInChild  = Utility.GetComponetInChild <CUIListScript>(widget, "SubMenuList/List");
            CUIListScript componetInChild2 = Utility.GetComponetInChild <CUIListScript>(widget, "DetailList/MenuList");

            CUICommonSystem.InitMenuPanel(componetInChild.gameObject, CPlayerCommonHeroInfoController.sSubTitles, 0, true);
            CUICommonSystem.InitMenuPanel(componetInChild2.gameObject, CPlayerCommonHeroInfoController.sSortTitles, 0, true);
        }
Ejemplo n.º 21
0
        public void Init()
        {
            if (this.m_statViewFormScript != null)
            {
                return;
            }
            CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(BattleStatView.s_battleStateViewUIForm, false, true);

            this.m_statViewFormScript = cUIFormScript;
            this._root = cUIFormScript.gameObject.transform.Find("BattleStatView").gameObject;
            if (this._root == null)
            {
                return;
            }
            this._heroList0 = new BattleStatView.HeroItem[5];
            this._heroList1 = new BattleStatView.HeroItem[5];
            this.heroView   = Utility.FindChild(this._root, "HeroView");
            this.matchInfo  = Utility.FindChild(this._root, "BattleMatchInfo");
            this.valueInfo  = Utility.FindChild(this._root, "HeroValueInfo");
            GameObject gameObject = Utility.FindChild(this._root, "ChartView");

            gameObject.CustomSetActive(false);
            if (Singleton <WatchController> .GetInstance().IsWatching)
            {
                this.chartView = new BattleStatView.ChartView(gameObject);
            }
            this.sortByCoinBtn = Utility.FindChild(cUIFormScript.gameObject, "TopCommon/SortByCoin");
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo();

            if (masterRoleInfo != null)
            {
                this.m_sortByCoin = (PlayerPrefs.GetInt(string.Format("Sgmae_Battle_SortByCoin_{0}", masterRoleInfo.playerUllUID)) > 0);
            }
            this.UpdateSortBtn();
            if (this.heroView == null || this.matchInfo == null || this.valueInfo == null)
            {
                return;
            }
            Animation component = this.matchInfo.transform.GetComponent <Animation>();

            if (component != null)
            {
                SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

                if (curLvelContext != null && (!curLvelContext.m_bEnableOrnamentSlot || !curLvelContext.m_bEnableShopHorizonTab))
                {
                    component.enabled = true;
                    component.Play();
                }
                else
                {
                    component.enabled = false;
                }
            }
            for (int i = 0; i < 5; i++)
            {
                this._heroList0[i] = new BattleStatView.HeroItem(Utility.FindChild(this.heroView, "HeroList_0/" + i), Utility.FindChild(this.matchInfo, "HeroList_0/" + i), Utility.FindChild(this.valueInfo, "HeroList_0/" + i));
                this._heroList1[i] = new BattleStatView.HeroItem(Utility.FindChild(this.heroView, "HeroList_1/" + i), Utility.FindChild(this.matchInfo, "HeroList_1/" + i), Utility.FindChild(this.valueInfo, "HeroList_1/" + i));
            }
            GameObject gameObject2 = cUIFormScript.gameObject.transform.Find("TopCommon/Panel_Menu/ListMenu").gameObject;

            if (gameObject2 == null)
            {
                return;
            }
            this.list = gameObject2.GetComponent <CUIListScript>();
            string[] titleList;
            if (Singleton <WatchController> .GetInstance().IsWatching)
            {
                titleList = new string[]
                {
                    Singleton <CTextManager> .GetInstance().GetText("BattleStateView_MatchInfo"),
                    Singleton <CTextManager> .GetInstance().GetText("BattleStateView_HeroInfo"),
                    Singleton <CTextManager> .GetInstance().GetText("BattleStateView_ExpTrend"),
                    Singleton <CTextManager> .GetInstance().GetText("BattleStateView_EcoTrend")
                };
            }
            else
            {
                titleList = new string[]
                {
                    Singleton <CTextManager> .GetInstance().GetText("BattleStateView_MatchInfo"),
                    Singleton <CTextManager> .GetInstance().GetText("BattleStateView_HeroInfo")
                };
            }
            this._defaultSelectIndex = 0;
            CUICommonSystem.InitMenuPanel(gameObject2, titleList, this._defaultSelectIndex, true);
            this.heroView.CustomSetActive(true);
            this.matchInfo.CustomSetActive(true);
            this.valueInfo.CustomSetActive(false);
            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Battle_CloseStatView, new CUIEventManager.OnUIEventHandler(this.onCloseClick));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BattleMatchInfo_InfoTypeChange, new CUIEventManager.OnUIEventHandler(this.OnBttleMatchInfoTabChange));

            Singleton <EventRouter> .get_instance().AddEventHandler(EventID.BATTLE_KDA_CHANGED, new Action(this.OnBattleKDAChanged));

            Singleton <EventRouter> .get_instance().AddEventHandler(EventID.BATTLE_HERO_PROPERTY_CHANGED, new Action(this.OnBattleHeroPropertyChange));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Battle_BattleStatViewSortClick, new CUIEventManager.OnUIEventHandler(this.OnSortClick));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Battle_StateViewClickHeroIcon, new CUIEventManager.OnUIEventHandler(this.OnBattle_StateViewClickHeroIcon));

            this.Hide();
        }