RandomGFGoStop/Assets/Scripts/UI/CollectionPanel.cs

42 lines
1.1 KiB
C#

using CodeJay.Classes;
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 = CurAlbumType == 1 ? "현대" : CurAlbumType == 2 ? "판타지" : "동양";
Set_ScrollView(GameManager.DB.Get_HuntingDatas(CurAlbumType));
}
public void OnClick_Arrow(int add)
{
CurAlbumType += add;
if (CurAlbumType < 1) CurAlbumType = 3;
else if (CurAlbumType > 3) CurAlbumType = 1;
Set_UI();
}
public void OnClick_Album()
{
CanvasControl.Ins.Go_Album();
}
public void ShowPanel(HuntingData data)
{
m_ShowPanel.Set(data);
}
}