using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
namespace Snxxz.UI
|
{
|
public class ExpertSkillConditionCell : CellView
|
{
|
[SerializeField] Text m_Condition;
|
[SerializeField] Text m_Description;
|
[SerializeField] Image m_Line;
|
|
TreasureSkillModel model { get { return ModelCenter.Instance.GetModel<TreasureSkillModel>(); } }
|
|
public void Display(int skillId, int level)
|
{
|
var skillConfig = SkillConfig.Get(skillId + level - 1);
|
var property = skillConfig.RequireProperty();
|
var propertyConfig = PlayerPropertyConfig.Get(property);
|
m_Condition.text = string.Format("{0}灵根{1}激活", propertyConfig.Name, skillConfig.RequirePropertyValue());
|
m_Description.text = skillConfig.Description;
|
|
m_Line.gameObject.SetActive(level < skillConfig.SkillMaxLV);
|
|
var currentValue = UIHelper.GetPropertyValue((PropertyType)property);
|
|
if (currentValue >= skillConfig.RequirePropertyValue())
|
{
|
m_Description.color = UIHelper.s_LightYellow;
|
}
|
else
|
{
|
m_Description.color = UIHelper.s_Gray;
|
}
|
}
|
}
|
}
|