| | |
| | | var hero = HeroManager.Instance.GetHero(item.guid); |
| | | if (hero == null) |
| | | return; |
| | | |
| | | var dict = FightPowerManager.Instance.GetHeroTotalAttr(hero); |
| | | foreach (var kv in attrBtns) |
| | | { |
| | | //每个按钮下有两个Text:name 和 value |
| | |
| | | Text valueText = button.transform.Find("value").GetComponent<Text>(); |
| | | |
| | | nameText.text = PlayerPropertyConfig.Get(id).ShowName; |
| | | valueText.text = PlayerPropertyConfig.GetValueDescription(id, 123); |
| | | var value = dict.TryGetValue(id, out long v) ? v : 0; |
| | | valueText.text = PlayerPropertyConfig.GetValueDescription(id, value); |
| | | } |
| | | } |
| | | |