Project_WL/Assets/Script/UI/Map/MapChoiceUI_Dungeon.cs

42 lines
1.4 KiB
C#
Raw Permalink Normal View History

using System.Collections.Generic;
2025-01-22 06:03:38 +00:00
using TMPro;
public class MapChoiceUI_Dungeon : uScrollViewMgr
{
2025-01-22 06:03:38 +00:00
public static MapChoiceUI_Dungeon Ins;
public MoneyForm MoneyForm_Ticket;
2025-02-03 06:58:53 +00:00
public MapChoiceUI_DungeonBase[] DungeonInfos; // 0 미믹, 1미궁, 2 악몽, 3 웨이브
2025-01-22 06:03:38 +00:00
public TextMeshProUGUI[] texts; // 0 던전이름
List<eDungeon> dungeons = new List<eDungeon> { eDungeon.d1_Mimic, eDungeon.d2_Maze, eDungeon.d3_Nightmare, eDungeon.d4_Wave };
2025-02-03 06:58:53 +00:00
int SelectMapID = 1001;
2025-01-22 06:03:38 +00:00
private void OnEnable()
{
Ins = this;
2025-01-22 06:03:38 +00:00
Set_ScrollView(dungeons);
2025-01-22 07:20:20 +00:00
for (int i = 0; i < list_CardBase.Count; i++)
{
if (list_CardBase[i].Get_IntData() == SelectMapID)
(list_CardBase[i] as WorldMapDungeonCard).OnClick_Card();
}
2025-01-22 06:03:38 +00:00
}
public void Select_Dungeon(int mapid)
2025-01-22 06:03:38 +00:00
{
2025-01-24 03:04:50 +00:00
SelectMapID = mapid;
2025-02-03 06:58:53 +00:00
var mapData = table_battlemapconfig.Ins.Get_Data(mapid);
texts[0].text = mapData.Get_Name();
MoneyForm_Ticket.Set(mapData.n_TicketID);
2025-02-01 03:05:20 +00:00
MoneyForm_Ticket.gameObject.SetActive(mapData.e_Dungeon != eDungeon.d4_Wave);
2025-02-03 06:58:53 +00:00
for (int i = 0; i < DungeonInfos.Length; i++)
DungeonInfos[i].Set(false);
DungeonInfos[MyEnumToInt.Ins.Get_Int(mapData.e_Dungeon) - 1].Set();
2025-02-18 01:55:30 +00:00
for (int i = 0; i < list_CardBase.Count; i++)
DSUtil.InActivateGameObjects((list_CardBase[i] as WorldMapDungeonCard).gos_onoff, 0);
2025-02-02 00:18:36 +00:00
}
}