Shegotwet/Assets/Scripts/UI/AlbumUI.cs

36 lines
907 B
C#
Raw Normal View History

using TMPro;
public class AlbumUI : uScrollViewMgr
{
2025-09-19 04:31:12 +00:00
public TextMeshProUGUI[] texts; // 0 이름, 1 카운팅, 2 보유 하트
int curGirl = 1;
public void Set()
{
gameObject.SetActive(true);
2025-09-19 19:31:06 +00:00
SoundInfo.Ins.Play_BGM(eBGM.b006_Album);
2025-09-19 03:21:14 +00:00
var lst = table_album.Ins.Get_DataList(curGirl);
Set_ScrollView(lst);
texts[0].text = table_girl.Ins.Get_Data(curGirl).s_Name;
2025-09-19 03:21:14 +00:00
var count = 0;
for (int i = 0; i < list_CardBase.Count; i++)
{
if ((list_CardBase[i] as AlbumCard).IsObtain())
++count;
}
texts[1].text = $"{count}/{lst.Count}";
2025-09-19 04:31:12 +00:00
texts[2].text = SaveMgr.Ins.Get_Money(eMoney.AlbumOpen).ToString();
}
public void OnClick_Arrow(int add)
{
curGirl += add;
if (curGirl > 8) curGirl = 1;
2025-09-11 20:17:41 +00:00
else if (curGirl < 1) curGirl = 8;
2025-09-19 04:31:12 +00:00
Set();
}
}