2025-12-16 04:30:42 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
|
|
public class MiniGameAlbumSelect : uScrollViewMgr
|
|
|
|
|
|
{
|
|
|
|
|
|
public Image[] images_btn;
|
|
|
|
|
|
public Image image_gogame;
|
|
|
|
|
|
|
|
|
|
|
|
List<Color32> list_btnColor = new List<Color32>
|
|
|
|
|
|
{
|
|
|
|
|
|
new Color32(146,164,180,255), // <20>̼<EFBFBD><CCBC><EFBFBD>
|
|
|
|
|
|
new Color32(0,163,206,255) // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
int CurTab = 0;
|
|
|
|
|
|
|
|
|
|
|
|
public void Set()
|
|
|
|
|
|
{
|
|
|
|
|
|
gameObject.SetActive(true);
|
|
|
|
|
|
Set_UI();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Set_UI()
|
|
|
|
|
|
{
|
|
|
|
|
|
images_btn[0].color = list_btnColor[CurTab == 0 ? 1 : 0];
|
|
|
|
|
|
images_btn[1].color = list_btnColor[CurTab == 1 ? 1 : 0];
|
|
|
|
|
|
|
|
|
|
|
|
var lst = table_album.Ins.Get_DataList(CurTab == 0 ? eCollectionMethod.Default : eCollectionMethod.FullCollection);
|
|
|
|
|
|
Set_ScrollView(lst, SaveMgr.Ins.Get_SelectGirlID());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void Select_Card(MiniGameAlbumSelectCard card)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (m_SelectCard) m_SelectCard.Set_Selected(false);
|
|
|
|
|
|
m_SelectCard = card;
|
|
|
|
|
|
if (m_SelectCard)
|
|
|
|
|
|
{
|
|
|
|
|
|
m_SelectCard.Set_Selected(true);
|
|
|
|
|
|
image_gogame.sprite = UIAtlasMgr.Ins.Get_Sprite("red_btn");
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
image_gogame.sprite = UIAtlasMgr.Ins.Get_Sprite("btn_gray");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int Get_CurTab() { return CurTab; }
|
|
|
|
|
|
|
|
|
|
|
|
public void OnClick_Btn(int index)
|
|
|
|
|
|
{
|
|
|
|
|
|
CurTab = index;
|
|
|
|
|
|
Set_UI();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void OnClick_GoMiniGame()
|
|
|
|
|
|
{
|
2025-12-16 23:56:46 +00:00
|
|
|
|
if (m_SelectCard && (SaveMgr.Ins.IsInfinityMiniGame() || SaveMgr.Ins.Check_Money(eMoney.MiniGameHP, 1, true)))
|
2025-12-16 04:30:42 +00:00
|
|
|
|
{
|
2025-12-16 23:56:46 +00:00
|
|
|
|
SaveMgr.Ins.m_SelectMiniGameGirl = m_SelectCard.Get_IntData();
|
|
|
|
|
|
SaveMgr.Ins.m_SelectMiniGameTab = CurTab;
|
|
|
|
|
|
LobbyUI.Ins.m_MiniGame.GameStart(false);
|
2025-12-16 04:30:42 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|