| 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; | 
|   | 
|   | 
|     string guid; | 
|     HeroInfo hero; | 
|   | 
|   | 
|     protected override void InitComponent() | 
|     { | 
|         okBtn.AddListener(CloseWindow); | 
|     } | 
|   | 
|   | 
|     protected override void OnPreOpen() | 
|     { | 
|         guid = HeroUIManager.Instance.waitResponse.guid; | 
|         if (string.IsNullOrEmpty(guid)) | 
|             return; | 
|         hero = HeroManager.Instance.GetHero(guid); | 
|         Refresh(); | 
|     } | 
|   | 
|     protected override void OnPreClose() | 
|     { | 
|     } | 
|   | 
|   | 
|     public override void Refresh() | 
|     { | 
|         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++) | 
|         { | 
|             attrStrArr.Add(PlayerPropertyConfig.GetFullDescription(nextQualityBreakConfig.AttrIDList[i], nextQualityBreakConfig.AttrValueList[i])); | 
|         } | 
|         if (nextQualityBreakConfig.SkillID != 0) | 
|         { | 
|             attrStrArr.Add(SkillConfig.Get(nextQualityBreakConfig.SkillID).Description); | 
|         } | 
|         potentialText.text = Language.Get("L1100", Language.Get("herocard56"), string.Join(Language.Get("L1112"), attrStrArr)); | 
|     } | 
|   | 
| } |