| using System.Collections.Generic; | 
| using System.Linq; | 
| using UnityEngine; | 
| using UnityEngine.UI; | 
|   | 
|   | 
| /// <summary> | 
| /// 武将突破界面 | 
| /// </summary> | 
| public class HeroLVBreakSuccessWin : UIBase | 
| { | 
|   | 
|     [SerializeField] Text breakLVText; | 
|     [SerializeField] Text nextBreakLVText; | 
|     [SerializeField] Text lvText; | 
|     [SerializeField] Text nextLVText; | 
|     [SerializeField] Text[] attrPerTextArr; | 
|     [SerializeField] Text[] nextAttrPerTextArr; | 
|     [SerializeField] Text potentialText; | 
|     [SerializeField] Button okBtn; | 
|     [SerializeField] ScrollRect scrollRect; | 
|   | 
|     string guid; | 
|   | 
|   | 
|     protected override void InitComponent() | 
|     { | 
|         okBtn.AddListener(CloseWindow); | 
|     } | 
|   | 
|   | 
|     protected override void OnPreOpen() | 
|     { | 
|         guid = HeroUIManager.Instance.waitResponse.guid; | 
|         if (string.IsNullOrEmpty(guid)) | 
|             return; | 
|         Display(HeroManager.Instance.GetHero(guid)); | 
|         scrollRect.verticalNormalizedPosition = 1; | 
|     } | 
|   | 
|     protected override void OnPreClose() | 
|     { | 
|     } | 
|   | 
|   | 
|     public void Display(HeroInfo hero) | 
|     { | 
|         breakLVText.text = "+" + (hero.breakLevel - 1); | 
|         nextBreakLVText.text = "+" + hero.breakLevel; | 
|         var beforeBreakLVConfig = HeroQualityBreakConfig.GetQualityBreakConfig(hero.Quality, hero.breakLevel - 1); | 
|         lvText.text = beforeBreakLVConfig.LVMax.ToString(); | 
|   | 
|         nextLVText.text = hero.qualityBreakConfig.LVMax.ToString(); | 
|   | 
|         for (int i = 0; i < attrPerTextArr.Length; i++) | 
|         { | 
|             attrPerTextArr[i].text = PlayerPropertyConfig.GetValueDescription(PlayerPropertyConfig.basePerAttrs[i], | 
|             hero.qualityConfig.BreakLVAddPer * (hero.breakLevel - 1)); | 
|         } | 
|         for (int i = 0; i < nextAttrPerTextArr.Length; i++) | 
|         { | 
|             nextAttrPerTextArr[i].text = PlayerPropertyConfig.GetValueDescription(PlayerPropertyConfig.basePerAttrs[i], | 
|             hero.qualityConfig.BreakLVAddPer * hero.breakLevel); | 
|         } | 
|   | 
|   | 
|         var nextQualityBreakConfig = HeroBreakConfig.GetHeroBreakConfig(hero.heroId, hero.breakLevel); | 
|         if (nextQualityBreakConfig == null) | 
|         { | 
|             potentialText.text = ""; | 
|             return; | 
|         } | 
|         List<string> attrStrArr = new List<string>(); | 
|         for (int i = 0; i < nextQualityBreakConfig.AttrIDList.Length; i++) | 
|         { | 
|             var id = nextQualityBreakConfig.AttrIDList[i]; | 
|             if (id == 0) | 
|                 continue; | 
|             attrStrArr.Add((string.IsNullOrEmpty(nextQualityBreakConfig.SkillIName) ? string.Empty : Language.Get("L1039", nextQualityBreakConfig.SkillIName)) + | 
|             PlayerPropertyConfig.GetFullDescription(id, nextQualityBreakConfig.AttrValueList[i])); | 
|         } | 
|         if (nextQualityBreakConfig.SkillID != 0) | 
|         { | 
|             var skill = SkillConfig.Get(nextQualityBreakConfig.SkillID); | 
|             attrStrArr.Add(Language.Get("L1039", skill.SkillName) + skill.Description); | 
|         } | 
|         potentialText.text = Language.Get("L1100", Language.Get("herocard56"), string.Join(Language.Get("L1112"), attrStrArr)); | 
|     } | 
|   | 
| } |