31 lines
774 B
C#
31 lines
774 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class PetInfoStatCard : CardBase
|
|
{
|
|
public TextMeshProUGUI[] texts; // 0 스탯명, 1 스탯
|
|
public GameObject go_line;
|
|
|
|
eStat m_Stat;
|
|
|
|
public override void Set<T>(T _base)
|
|
{
|
|
base.Set(_base);
|
|
m_Stat = DSUtil.StringToEnum<eStat>(_base.ToString());
|
|
if (m_Stat == eStat.None)
|
|
{
|
|
texts[0].text = texts[1].text = "";
|
|
go_line.SetActive(true);
|
|
}
|
|
else
|
|
{
|
|
texts[0].text = MyText.Get_StatName(m_Stat);
|
|
go_line.SetActive(false);
|
|
}
|
|
}
|
|
public void Set(ActorStatInfo statinfo)
|
|
{
|
|
if (!go_line.activeSelf)
|
|
texts[1].text = MyText.Get_StatValueText(m_Stat, statinfo.Get_Stat(m_Stat));
|
|
}
|
|
} |