Project_WL/Assets/Script/UI/Collection/Monster/CollectionMonsterUI.cs

42 lines
891 B
C#
Raw Normal View History

2024-12-15 01:39:39 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CollectionMonsterUI : PCUIMenu
{
public static CollectionMonsterUI Ins;
public CollectionMonsterUI_Scroll m_Scroll;
public CollectionMonsterUI_Info m_Info;
int m_Index = 1;
CollectionMonsterCard m_SelectCard;
public override void Set()
{
Ins = this;
base.Set();
OnClick_Tab(m_Index);
}
public void Set_UI()
{
m_Scroll.Set(m_Index);
if (DSUtil.CheckNull(m_SelectCard))
Set_SelectCard(m_Scroll.Get_FirstCard());
else
Set_SelectCard(m_SelectCard);
}
public void Set_SelectCard(CollectionMonsterCard card)
{
m_SelectCard = card;
m_Info.Set(m_SelectCard);
}
public void OnClick_Tab(int index)
{
m_Index = index;
Set_UI();
}
}