| | |
| | | |
| | | [SerializeField] Image[] beforeStars; |
| | | [SerializeField] Image[] afterStars; |
| | | [SerializeField] Text[] attrInheritPerNameArr; //新增继承属性成长 |
| | | [SerializeField] Text[] attrInheritPerTextArr; |
| | | [SerializeField] Text[] nextAttrInheritPerTextArr; |
| | | [SerializeField] Text[] attrPerNameArr; |
| | | [SerializeField] Text[] attrPerTextArr; |
| | | [SerializeField] Text[] nextAttrPerTextArr; |
| | |
| | | HeroInfo hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuidForGiftFuncForSuccessWin); |
| | | if (hero == null) |
| | | return; |
| | | |
| | | hero.RefreshInheritPer(); //强制重刷 |
| | | |
| | | int beforeStarCount = HeroUIManager.Instance.eatBeforeStar; |
| | | int afterStarCount = hero.heroStar; |
| | | |
| | |
| | | int id = PlayerPropertyConfig.basePerAttrs[i]; |
| | | attrPerNameArr[i].text = PlayerPropertyConfig.Get(id).Name; |
| | | nextAttrPerTextArr[i].text = PlayerPropertyConfig.GetValueDescription(id, valuePer); |
| | | attrPerTextArr[i].text = PlayerPropertyConfig.GetValueDescription(id, valuePer - hero.qualityConfig.StarAddPer*(afterStarCount - beforeStarCount)); |
| | | attrPerTextArr[i].text = PlayerPropertyConfig.GetValueDescription(id, valuePer - hero.qualityConfig.StarAddPer * (afterStarCount - beforeStarCount)); |
| | | } |
| | | |
| | | for (int i = 0; i < attrInheritPerNameArr.Length; i++) |
| | | { |
| | | int id = PlayerPropertyConfig.baseAttrs[i]; |
| | | var curValue = hero.GetInheritAttrPer(id); |
| | | var showID = hero.GetInheritAttrIDByBaseID(id); |
| | | attrInheritPerNameArr[i].text = PlayerPropertyConfig.Get(showID).Name; |
| | | nextAttrInheritPerTextArr[i].text = PlayerPropertyConfig.GetValueDescription(showID, curValue); |
| | | var addPer = hero.GetInheritSingleAttrValue(showID); |
| | | attrInheritPerTextArr[i].text = PlayerPropertyConfig.GetValueDescription(showID, curValue - addPer * (afterStarCount - beforeStarCount)); |
| | | } |
| | | |
| | | //天赋 |