43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class EquipmentPopup : EquipmentPopupItemInfoBase
|
|
{
|
|
public EquipmentPopupBase[] obtains; // 0 미보유, 1 보유
|
|
public TextMeshProUGUI text_equipstatus;
|
|
public GameObject[] gos_onoff;
|
|
|
|
public override void Set(EquipmentListTableData data)
|
|
{
|
|
base.Set(data);
|
|
Set_UI();
|
|
DSUtil.InActivateGameObjects(gos_onoff);
|
|
}
|
|
|
|
public override void Set_UI()
|
|
{
|
|
Set_ItemInfo();
|
|
|
|
for (int i = 0; i < obtains.Length; i++)
|
|
obtains[i].Off();
|
|
|
|
var sdata = ServerInfo.Ins.m_ServerData;
|
|
if (sdata.IsObtainItem(m_Data.n_EquipID))
|
|
{
|
|
obtains[1].Set(m_Data, Set_UI);
|
|
text_equipstatus.text = sdata.IsEquipItem(m_Data.n_EquipID) ?
|
|
table_localtext.Ins.Get_Text(207) : table_localtext.Ins.Get_Text(185);
|
|
}
|
|
else
|
|
{ // 미보유
|
|
obtains[0].Set(m_Data);
|
|
text_equipstatus.text = table_localtext.Ins.Get_Text(208);
|
|
}
|
|
}
|
|
|
|
public override void OnClick_Back()
|
|
{
|
|
base.OnClick_Back();
|
|
DSUtil.ActivateGameObjects(gos_onoff);
|
|
}
|
|
} |