53 lines
1.2 KiB
C#
53 lines
1.2 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class AllPassUI : BackKeyAdd
|
|
{
|
|
public UILabel[] labels; // 0 가격, 1 클로버
|
|
|
|
Action m_actabort;
|
|
ShopTableData m_ShopTableData;
|
|
bool CanBuy;
|
|
|
|
public override void Set(Action _actabort)
|
|
{
|
|
base.Set();
|
|
m_actabort = _actabort;
|
|
|
|
if (m_ShopTableData == null)
|
|
m_ShopTableData = table_shop.Ins.Get_Data(eItem.Pass, 101);
|
|
var price = InappInfo.Ins.Get_Price_orNull(m_ShopTableData.InappID);
|
|
if (price != null)
|
|
{
|
|
CanBuy = true;
|
|
labels[0].text = price;
|
|
}
|
|
else
|
|
{
|
|
CanBuy = false;
|
|
labels[0].text = "구매 불가";
|
|
}
|
|
labels[1].text = "990";
|
|
}
|
|
|
|
public void OnClick_Buy()
|
|
{
|
|
if (!CanBuy) return;
|
|
|
|
NetWait.Ins.Set(true);
|
|
//InappInfo.Ins.Buy_InappItem(m_ShopTableData.InappID, () =>
|
|
//{
|
|
// NetWait.Ins.Set(false);
|
|
// Set_Off();
|
|
// GameUI.Ins.LobbyUI.Get_PassUI().Set();
|
|
//});
|
|
}
|
|
|
|
public override void OnClick_Back()
|
|
{
|
|
base.OnClick_Back();
|
|
m_actabort?.Invoke();
|
|
}
|
|
} |