38 lines
982 B
C#
38 lines
982 B
C#
using TMPro;
|
|
using UnityEngine.UI;
|
|
|
|
public class ShopJewelBuyPopup : BackKeyAdd
|
|
{
|
|
public TextMeshProUGUI[] texts; // 0 메시지1, 1 메시지2, 2 가격
|
|
public Image i_jewel;
|
|
|
|
ShopItemListTableData m_CashData;
|
|
|
|
private void Start()
|
|
{
|
|
i_jewel.sprite = UIAtlasMgr.Ins.Get_Sprite(3);
|
|
}
|
|
|
|
public void Set(ShopItemListTableData data)
|
|
{
|
|
base.Set();
|
|
var sdata = ServerInfo.Ins.m_ServerData;
|
|
|
|
var diff = data.n_Price - (int)sdata.Get_ItemAmount(data.n_PriceItemID);
|
|
texts[0].text = DSUtil.Format(398, diff);
|
|
|
|
m_CashData = table_shopitemlist.Ins.Get_CashData(data.n_Price);
|
|
texts[1].text = DSUtil.Format(399, sdata.Get_ShopPriceText(m_CashData));
|
|
texts[2].text = sdata.Get_ShopPriceText(m_CashData);
|
|
}
|
|
|
|
public void OnClick_Other()
|
|
{
|
|
OnClick_Back();
|
|
}
|
|
|
|
public void OnClick_Buy()
|
|
{
|
|
ServerInfo.Ins.m_ServerData.Buy_ShopItem(m_CashData, OnClick_Back);
|
|
}
|
|
} |