42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
using System.Collections.Generic;
|
|
using TMPro;
|
|
|
|
public class MapChoiceUI_Dungeon : uScrollViewMgr
|
|
{
|
|
public static MapChoiceUI_Dungeon Ins;
|
|
|
|
public MoneyForm MoneyForm_Ticket;
|
|
public MapChoiceUI_DungeonBase[] DungeonInfos; // 0 미믹, 1미궁, 2 악몽, 3 웨이브
|
|
public TextMeshProUGUI[] texts; // 0 던전이름
|
|
|
|
List<eDungeon> dungeons = new List<eDungeon> { eDungeon.d1_Mimic, eDungeon.d2_Maze, eDungeon.d3_Nightmare, eDungeon.d4_Wave };
|
|
int SelectMapID = 1001;
|
|
|
|
private void OnEnable()
|
|
{
|
|
Ins = this;
|
|
Set_ScrollView(dungeons);
|
|
for (int i = 0; i < list_CardBase.Count; i++)
|
|
{
|
|
if (list_CardBase[i].Get_IntData() == SelectMapID)
|
|
(list_CardBase[i] as WorldMapDungeonCard).OnClick_Card();
|
|
}
|
|
}
|
|
|
|
public void Select_Dungeon(int mapid)
|
|
{
|
|
SelectMapID = mapid;
|
|
|
|
var mapData = table_battlemapconfig.Ins.Get_Data(mapid);
|
|
texts[0].text = mapData.Get_Name();
|
|
MoneyForm_Ticket.Set(mapData.n_TicketID);
|
|
MoneyForm_Ticket.gameObject.SetActive(mapData.e_Dungeon != eDungeon.d4_Wave);
|
|
|
|
for (int i = 0; i < DungeonInfos.Length; i++)
|
|
DungeonInfos[i].Set(false);
|
|
DungeonInfos[MyEnumToInt.Ins.Get_Int(mapData.e_Dungeon) - 1].Set();
|
|
|
|
for (int i = 0; i < list_CardBase.Count; i++)
|
|
DSUtil.InActivateGameObjects((list_CardBase[i] as WorldMapDungeonCard).gos_onoff, 0);
|
|
}
|
|
} |