using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class MiniGameAlbumSelect : uScrollViewMgr { public Image[] images_btn; public Image image_gogame; List list_btnColor = new List { new Color32(146,164,180,255), // ¹Ì¼±Åà new Color32(0,163,206,255) // ¼±Åà }; 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() { if (m_SelectCard) { bool gogame = false; if (SaveMgr.Ins.IsInfinityMiniGame()) { gogame = true; } else if (SaveMgr.Ins.Check_Money(eMoney.MiniGameHP, 1, true)) { SaveMgr.Ins.Add_Money(eMoney.MiniGameHP, -1); SaveMgr.Ins.Save(); gogame = true; } if (gogame) LobbyUI.Ins.m_MiniGame.GameStart(false); } } }