31 lines
749 B
C#
31 lines
749 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class CardTimeUI : MyCoroutine
|
|
{
|
|
public GameObject go_time;
|
|
public TextMeshProUGUI t_time;
|
|
|
|
int m_ShopID;
|
|
|
|
public void Set_ShopADTime(int shopid, bool issoldout)
|
|
{
|
|
m_ShopID = shopid;
|
|
var sdata = ServerInfo.Ins.m_ServerData;
|
|
|
|
go_time.SetActive(!issoldout && sdata.Get_ShopADRemainTime(m_ShopID) > 0);
|
|
if (go_time.activeSelf)
|
|
{
|
|
Set_Time();
|
|
if (DSUtil.CheckNull(m_Co_for1Sec))
|
|
Set_Repeat_for1sec(Set_Time);
|
|
}
|
|
else
|
|
Cancel_Repeat_forsec();
|
|
}
|
|
|
|
void Set_Time()
|
|
{
|
|
t_time.text = DSUtil.Get_TimeText_MS(ServerInfo.Ins.m_ServerData.Get_ShopADRemainTime(m_ShopID));
|
|
}
|
|
} |