using System;
|
using System.Linq;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
|
public class BeautyMMTalentAttrCell : CellView
|
{
|
[SerializeField] Text lvText;
|
[SerializeField] Text nameText;
|
[SerializeField] Text valueText;
|
public void Display(int lv, int mmID)
|
{
|
var lvValue = BeautyMMManager.Instance.GetMMLV(mmID);
|
bool isLVActive = false;
|
if (lvValue >= lv)
|
{
|
isLVActive = true;
|
}
|
var mmConfig = BeautyConfig.Get(mmID);
|
BeautyQualityLVConfig config;
|
BeautyQualityLVConfig.TryGetBeautyQualityLVConfig(mmConfig.BeautyQuality, lv, out config);
|
if (config == null)
|
{
|
return;
|
}
|
var id = config.AttrIDList[0];
|
if (!isLVActive)
|
{
|
lvText.text = UIHelper.AppendColor(TextColType.NavyGray, Language.Get($"L1113", index));
|
nameText.text = UIHelper.AppendColor(TextColType.NavyGray, PlayerPropertyConfig.Get(id).Name);
|
valueText.text = UIHelper.AppendColor(TextColType.NavyGray, PlayerPropertyConfig.GetValueDescription(id, config.AttrValueList[0]));
|
}
|
else
|
{
|
lvText.text = Language.Get($"L1113", index);
|
nameText.text = PlayerPropertyConfig.Get(id).Name;
|
valueText.text = PlayerPropertyConfig.GetValueDescription(id, config.AttrValueList[0]);
|
}
|
}
|
|
|
}
|