using vnxbqy.UI;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
public class EvolvePropertyCell : ILBehaviour
|
{
|
Text pro;
|
Image newimg;
|
|
|
protected override void Awake()
|
{
|
pro = proxy.GetWidgtEx<Text>("Text");
|
newimg = proxy.GetWidgtEx<Image>("image");
|
}
|
|
public void Display(int finalEquipID, int equipID, int index)
|
{
|
var equipInfo = EquipShenAttrConfig.Get(finalEquipID);
|
int propertyId = 0;
|
int value = 0;
|
int quality = EquipEvolveModel.Instance.GetRedEquipQuality(equipID);
|
string preText = "";
|
|
newimg.SetActiveIL(false);
|
Color color;
|
if (index < equipInfo.JiAttrID.Length)
|
{
|
propertyId = equipInfo.JiAttrID[index];
|
value = equipInfo.JiAttrValue[index];
|
color = UIHelper.GetUIColor(quality > 3 ? (quality == 4 ? TextColType.White : TextColType.Gray) : TextColType.Green, true);
|
preText = Language.Get("ShenEquipText3");
|
newimg.SetActiveIL(quality == 4);
|
}
|
else if (index < (equipInfo.JiAttrID.Length + equipInfo.XianAttrID.Length))
|
{
|
index = index - equipInfo.JiAttrID.Length;
|
propertyId = equipInfo.XianAttrID[index];
|
value = equipInfo.XianAttrValue[index];
|
color = UIHelper.GetUIColor(quality > 2 ? (quality == 3 ? TextColType.White : TextColType.Gray) : TextColType.Green, true);
|
preText = Language.Get("ShenEquipText2");
|
newimg.SetActiveIL(quality == 3);
|
}
|
else
|
{
|
index = index - equipInfo.JiAttrID.Length - equipInfo.XianAttrID.Length;
|
propertyId = equipInfo.ShenAttrID[index];
|
value = equipInfo.ShenAttrValue[index];
|
color = UIHelper.GetUIColor(quality > 1 ? (quality == 2 ? TextColType.White : TextColType.Gray) : TextColType.Green, true);
|
preText = Language.Get("ShenEquipText1");
|
newimg.SetActiveIL(quality == 2);
|
}
|
|
pro.text = preText + PlayerPropertyConfig.GetFullDescription(propertyId, value);
|
pro.color = color;
|
}
|
|
}
|