using System.Collections;
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
namespace Snxxz.UI
|
{
|
[XLua.Hotfix]
|
public class GatherSoulEquipCell : CellView
|
{
|
[SerializeField] Image m_Icon;
|
[SerializeField] Text m_Level;
|
[SerializeField] PropertyBehaviour[] m_Propertys;
|
[SerializeField] RectTransform m_Redpoint;
|
|
GatheringSoulModel model
|
{
|
get { return ModelCenter.Instance.GetModel<GatheringSoulModel>(); }
|
}
|
|
VirtualPackModel virtualPack
|
{
|
get { return ModelCenter.Instance.GetModel<VirtualPackModel>(); }
|
}
|
|
public void Display(GatherSoulItem item, bool requireRedpoint)
|
{
|
var itemConfig = ItemConfig.Get(item.id);
|
m_Icon.SetSprite(itemConfig.IconKey);
|
m_Level.text = item.level.ToString();
|
|
var list = model.gatherSoulPropertys[item.id];
|
for (int i = 0; i < m_Propertys.Length; i++)
|
{
|
m_Propertys[i].gameObject.SetActive(i < list.Count);
|
if (i < list.Count)
|
{
|
var propertyValue = model.GetPropertyValue(item.id, list[i], item.level);
|
m_Propertys[i].DisplayUpper(list[i], propertyValue);
|
}
|
}
|
m_Redpoint.gameObject.SetActive(requireRedpoint);
|
}
|
}
|
}
|