2025-10-01 16:07:44 +00:00
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
2025-09-10 00:11:14 +00:00
|
|
|
public class AttandanceUI : uScrollViewMgr
|
|
|
|
|
{
|
2025-09-16 19:27:59 +00:00
|
|
|
public AttandacneCard Day7;
|
2025-10-01 16:07:44 +00:00
|
|
|
public Image i_btn;
|
2025-09-16 19:27:59 +00:00
|
|
|
|
2025-09-10 00:11:14 +00:00
|
|
|
public void Set()
|
|
|
|
|
{
|
|
|
|
|
gameObject.SetActive(true);
|
2025-09-16 19:27:59 +00:00
|
|
|
var lst = table_attandance.Ins.Get_DataList();
|
|
|
|
|
Set_ScrollView(lst.FindAll(f=>f.n_Day < 7));
|
|
|
|
|
Day7.Set(lst.Find(f => f.n_Day == 7));
|
2025-10-01 16:07:44 +00:00
|
|
|
i_btn.sprite = UIAtlasMgr.Ins.Get_Sprite(SaveMgr.Ins.CanGet_Attandance() ? "red btn_daily" : "gray btn");
|
2025-09-10 00:11:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void OnClick_Get()
|
|
|
|
|
{
|
2025-09-10 01:24:53 +00:00
|
|
|
if (SaveMgr.Ins.CanGet_Attandance())
|
|
|
|
|
{
|
|
|
|
|
SaveMgr.Ins.Get_AttandanceReward();
|
|
|
|
|
Set();
|
|
|
|
|
}
|
2025-09-10 00:11:14 +00:00
|
|
|
}
|
|
|
|
|
}
|