Project_WL/Assets/Script/UI/Shop/ShopJewelBuyPopup.cs

39 lines
1.0 KiB
C#
Raw Permalink Normal View History

2025-04-24 23:39:00 +00:00
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();
2025-04-27 22:59:23 +00:00
NewGameUI.Ins.m_ShopUI.Go_Money();
2025-04-24 23:39:00 +00:00
}
public void OnClick_Buy()
{
ServerInfo.Ins.m_ServerData.Buy_ShopItem(m_CashData, OnClick_Back);
}
}