RandomGFGoStop/Assets/Scripts/UI/CollectionPanel.cs

42 lines
1.0 KiB
C#
Raw Normal View History

2025-09-06 00:34:59 +00:00
using CodeJay.Classes;
2025-09-05 22:49:38 +00:00
using UnityEngine;
public class CollectionPanel : uScrollViewMgr
{
[SerializeField] private TMPro.TextMeshProUGUI TitleTMP, t_type;
public ShowPanel m_ShowPanel;
private int CurAlbumType = 1;
private void OnEnable()
{
Set_UI();
}
public void Set_UI()
{
var curtargetindex = GameManager.DB.GetUnlockTargetIndex(true);
DB_HuntingListData huntingListData = DB_HuntingListData.GetEntity(curtargetindex);
TitleTMP.text = huntingListData.DBF_Title;
t_type.text = $"Type{CurAlbumType}";
2025-09-06 00:34:59 +00:00
Set_ScrollView(GameManager.DB.Get_HuntingDatas(CurAlbumType));
2025-09-05 22:49:38 +00:00
}
public void OnClick_Arrow(int add)
{
CurAlbumType += add;
if (CurAlbumType < 1) CurAlbumType = 10;
else if (CurAlbumType > 10) CurAlbumType = 1;
Set_UI();
}
public void OnClick_Album()
{
CanvasControl.Ins.Go_Album();
}
2025-09-06 00:34:59 +00:00
public void ShowPanel(HuntingData data)
{
m_ShowPanel.Set(data);
}
2025-09-05 22:49:38 +00:00
}