Ejemplo n.º 1
0
        private void InitPropertyInfo()
        {
            for (int i = 0; i < (int)EMobaDetailedPropertyInfoID.EMDPI_Max; i++)
            {
                if (i >= propertyName.Length || propertyName[i] == null)
                {
                    continue;
                }

                propertyName[i].text = ULocalizationService.Instance.Get("UIView", "WarHeroDetailedInfoPanel", "Title_" + i.ToString());
                string       sDesc        = ULocalizationService.Instance.Get("ToolTips", "WarHeroDetailedInfoPanel", "PropertyName_" + i);
                PropertyItem propertyItem = propertyName[i].gameObject.AddComponent <PropertyItem>();
                propertyItem.SetToolTipDesc(sDesc);
                propertyItem.triger = propertyItem.gameObject.GetComponent <UTooltipTrigger>();
                propertyName[i].transform.FindChild("PValue").gameObject.GetComponent <Text>().text = "0";
                //初始化主英雄属性表
                DicMainHeroProperty.Add(i, 0);
            }
        }