| | |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | |
| | | [SerializeField] Text lvupBtnText; |
| | | [SerializeField] LongPressButton lvupBtn; |
| | | [SerializeField] Button allAttrBtn; |
| | | [SerializeField] Text allPotentialText; //潜能 |
| | | string guid; |
| | | HeroInfo hero; |
| | | protected override void InitComponent() |
| | |
| | | RefreshName(); |
| | | RefreshFoldState(); |
| | | RefreshAttr(); |
| | | RefreshAllPotential(); |
| | | } |
| | | |
| | | void RefreshItemLockEvent(PackType type, string guid, bool lockState) |
| | |
| | | List<Item> items = new List<Item>(); |
| | | |
| | | |
| | | var payBack1 = CommonFunc.AddDict(HeroUIManager.Instance.GetHeroLVPayBack(hero.heroId, hero.heroLevel), |
| | | var payBack1 = CommonFunc.AddDict(HeroUIManager.Instance.GetHeroLVPayBack(hero.Quality, hero.heroLevel), |
| | | HeroUIManager.Instance.GetHeroBreakPayBack(hero.heroId, hero.breakLevel)); |
| | | |
| | | //已觉醒的需要消耗货币 |
| | |
| | | heroAddAttrPerText[i].text = PlayerPropertyConfig.GetFullDescription(new Int2(PlayerPropertyConfig.basePerAttrs[i], valuePer)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //区分突破和最大等级 |
| | | if (!HeroUIManager.Instance.IsLVMax(hero)) |
| | |
| | | { |
| | | //突破 |
| | | if (!UIManager.Instance.IsOpened<HeroLVBreakWin>()) |
| | | { |
| | | { |
| | | HeroUIManager.Instance.selectHeroGuid = guid; |
| | | UIManager.Instance.OpenWindow<HeroLVBreakWin>(); |
| | | } |
| | |
| | | { |
| | | addPerText[i].text = "+" + PlayerPropertyConfig.GetValueDescription(PlayerPropertyConfig.basePerAttrs[i], hero.qualityConfig.BreakLVAddPer); |
| | | } |
| | | addPerObject.Play(()=> |
| | | { |
| | | addPerObject.Play(() => |
| | | { |
| | | addPerObject.SetActive(false); |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | void RefreshAllPotential() |
| | | { |
| | | if (!HeroBreakConfig.configDics.ContainsKey(hero.heroId)) |
| | | return; |
| | | |
| | | var list = HeroBreakConfig.configDics[hero.heroId].Keys.ToList(); |
| | | |
| | | list.Sort(); |
| | | |
| | | string allAttrStr = string.Empty; |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | var nextQualityBreakConfig = HeroBreakConfig.GetHeroBreakConfig(hero.heroId, i + 1); |
| | | List<string> attrStrArr = new List<string>(); |
| | | for (int j = 0; j < nextQualityBreakConfig.AttrIDList.Length; j++) |
| | | { |
| | | string format = i < hero.breakLevel ? "{0}" + UIHelper.AppendColor(TextColType.Green, "+{1}") : "{0}+{1}"; |
| | | attrStrArr.Add(PlayerPropertyConfig.GetFullDescription(nextQualityBreakConfig.AttrIDList[j], nextQualityBreakConfig.AttrValueList[j], format)); |
| | | } |
| | | if (nextQualityBreakConfig.SkillID != 0) |
| | | { |
| | | attrStrArr.Add(SkillConfig.Get(nextQualityBreakConfig.SkillID).Description); |
| | | } |
| | | if (i < hero.breakLevel) |
| | | { |
| | | allAttrStr += Language.Get("herocard63", i + 1, string.Join(Language.Get("L1112"), attrStrArr)) + "\n"; |
| | | } |
| | | else |
| | | { |
| | | //置灰 |
| | | allAttrStr += UIHelper.AppendColor(TextColType.Gray, Language.Get("herocard63", i + 1, string.Join(Language.Get("L1112"), attrStrArr))) + "\n"; |
| | | } |
| | | } |
| | | |
| | | allPotentialText.text = allAttrStr.Trim(); |
| | | |
| | | } |
| | | } |