예제 #1
0
        public void RefreshHeroInfo()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CQualifyingSystem.s_qualifyingFormPath);

            if (form == null)
            {
                return;
            }
            ListView <IHeroData> hostHeroList = CHeroDataFactory.GetHostHeroList(true, CMallSortHelper.HeroViewSortType.Name);
            GameObject           gameObject   = form.gameObject.transform.Find("Panel/Panel_HeroInfo").gameObject;
            Text          component           = gameObject.transform.Find("lblProficiency").GetComponent <Text>();
            CUIListScript component2          = gameObject.transform.Find("ListHeroIno").GetComponent <CUIListScript>();

            component2.SetElementAmount(hostHeroList.get_Count());
            for (int i = 0; i < hostHeroList.get_Count(); i++)
            {
                GameObject gameObject2 = component2.GetElemenet(i).gameObject;
                Image      component3  = gameObject2.transform.Find("heroInfo/imgRank").GetComponent <Image>();
                Text       component4  = gameObject2.transform.Find("heroInfo/lblRank").GetComponent <Text>();
                component3.SetSprite(CUIUtility.s_Sprite_System_Qualifying_Dir + "ranking_icon" + hostHeroList.get_Item(i).proficiencyLV, form, true, false, false, false);
                component4.text = hostHeroList.get_Item(i).proficiency.ToString();
            }
            uint num = 0u;

            for (int j = 0; j < hostHeroList.get_Count(); j++)
            {
                num += hostHeroList.get_Item(j).proficiency;
            }
            component.text = CUIUtility.StringReplace(Singleton <CTextManager> .GetInstance().GetText("Qualifying_Title0"), new string[]
            {
                num.ToString()
            });
        }
예제 #2
0
        public void RefreshHeroInfo()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(s_qualifyingFormPath);

            if (form != null)
            {
                ListView <IHeroData> hostHeroList = CHeroDataFactory.GetHostHeroList(true);
                GameObject           gameObject   = form.gameObject.transform.Find("Panel/Panel_HeroInfo").gameObject;
                Text          component           = gameObject.transform.Find("lblProficiency").GetComponent <Text>();
                CUIListScript script2             = gameObject.transform.Find("ListHeroIno").GetComponent <CUIListScript>();
                script2.SetElementAmount(hostHeroList.Count);
                for (int i = 0; i < hostHeroList.Count; i++)
                {
                    GameObject obj3  = script2.GetElemenet(i).gameObject;
                    Image      image = obj3.transform.Find("heroInfo/imgRank").GetComponent <Image>();
                    Text       text2 = obj3.transform.Find("heroInfo/lblRank").GetComponent <Text>();
                    image.SetSprite(CUIUtility.s_Sprite_System_Qualifying_Dir + "ranking_icon" + hostHeroList[i].proficiencyLV, form, true, false, false);
                    text2.text = hostHeroList[i].proficiency.ToString();
                }
                uint num2 = 0;
                for (int j = 0; j < hostHeroList.Count; j++)
                {
                    num2 += hostHeroList[j].proficiency;
                }
                string[] values = new string[] { num2.ToString() };
                component.text = CUIUtility.StringReplace(Singleton <CTextManager> .GetInstance().GetText("Qualifying_Title0"), values);
            }
        }