Project_WL/Assets/Script/UI/Collection/Equipment/CollectionEquipmentUI.cs

42 lines
1013 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CollectionEquipmentUI : PCUIMenu
{
public static CollectionEquipmentUI Ins;
public CollectionEquipmentUI_Scroll m_CollectionEquipmentUI_Scroll;
public CollectionEquipmentUI_Info m_CollectionEquipmentUI_Info;
int m_Index = 1;
CollectionEquipmentCard m_SelectCard;
public override void Set()
{
Ins = this;
base.Set();
OnClick_Tab(m_Index);
}
public void Set_UI()
{
m_CollectionEquipmentUI_Scroll.Set(m_Index);
if (DSUtil.CheckNull(m_SelectCard))
Set_SelectCard(m_CollectionEquipmentUI_Scroll.Get_FirstCard());
else
Set_SelectCard(m_SelectCard);
}
public void Set_SelectCard(CollectionEquipmentCard card)
{
m_SelectCard = card;
m_CollectionEquipmentUI_Info.Set(m_SelectCard);
}
public void OnClick_Tab(int index)
{
m_Index = index;
Set_UI();
}
}