using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace vnxbqy.UI { public class EquipStrengthMasterCell : CellView { [SerializeField] Text PlusSum; [SerializeField] Text MasterAttr1; [SerializeField] Text MasterAttr2; EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel(); } } public void Display(int index) { } public void ShowMasterAttr(int level, int masterPlusLV) { int minLV = strengthModel.GetStrengthMinLV(level); var curMasterLV = strengthModel.GetMasterLV(strengthModel.SelectLevel); var masterInfo = ItemPlusMasterConfig.TryGetMasterInfo(level, masterPlusLV); PlusSum.text = UIHelper.AppendColor(curMasterLV >= masterPlusLV ? TextColType.Green : TextColType.Gray, Language.Get("Z2003") + masterPlusLV, true); //PlayerPropertyConfig.GetFullDescription(property.x, property.y); MasterAttr2.SetActive(masterInfo.MasterPlusAttrID.Length == 2); for (int i=0; i < masterInfo.MasterPlusAttrID.Length; i++) { switch (i) { case 0: { MasterAttr1.text = UIHelper.AppendColor(curMasterLV >= masterPlusLV ? TextColType.Green : TextColType.Gray, PlayerPropertyConfig.GetFullDescription(masterInfo.MasterPlusAttrID[i], masterInfo.MasterPlusAttrValue[i]), true); break; } case 1: { MasterAttr2.text = UIHelper.AppendColor(curMasterLV >= masterPlusLV ? TextColType.Green : TextColType.Gray, PlayerPropertyConfig.GetFullDescription(masterInfo.MasterPlusAttrID[i], masterInfo.MasterPlusAttrValue[i]), true); break; } } } } } }