31 lines
737 B
C#
31 lines
737 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_ShopADTime(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_ShopADTime(m_ShopID));
|
||
|
|
}
|
||
|
|
}
|