Project_WL/Assets/Script/UI/Farm/FarmShopUI.cs

28 lines
699 B
C#
Raw Normal View History

using System.Collections.Generic;
2024-12-15 01:39:39 +00:00
using TMPro;
public class FarmShopUI : BotMenuBase
{
public static FarmShopUI Ins;
public TextMeshProUGUI[] texts; // 0 갱신 시간
2025-07-23 03:31:50 +00:00
private void Start() { Ins = this; }
2024-12-15 01:39:39 +00:00
public override void Set()
{
base.Set();
2025-07-23 03:31:50 +00:00
Set_Repeat_for1sec(Set_NextTime);
var lst = new List<int>();
foreach (var item in ServerInfo.Ins.m_ServerData.Farm.Shop)
lst.Add(int.Parse(item.Key));
Set_ScrollView(lst);
2024-12-15 01:39:39 +00:00
Set_NextTime();
2025-07-23 03:31:50 +00:00
Set_Money(1, 2);
2024-12-15 01:39:39 +00:00
}
void Set_NextTime()
{
texts[0].text = DSUtil.Get_TimeText_HMS(ServerInfo.ServerTime.Date.AddDays(1) - ServerInfo.ServerTime);
}
}