71 lines
2.5 KiB
C#
71 lines
2.5 KiB
C#
using CodeStage.AntiCheat.ObscuredTypes;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
|
|
public class MapChoiceUI_Dungeon : uScrollViewMgr
|
|
{
|
|
public static MapChoiceUI_Dungeon Ins;
|
|
|
|
public MoneyForm MoneyForm_Ticket;
|
|
public TextMeshProUGUI[] texts; // 0 던전이름
|
|
public ArrowUI m_ArrowUI;
|
|
|
|
List<eDungeon> dungeons = new List<eDungeon> { eDungeon.d1_Mimic, eDungeon.d2_Maze, eDungeon.d3_Nightmare, eDungeon.d4_Wave };
|
|
ObscuredInt SelectMapID = 1001, SelectLv;
|
|
|
|
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 override void Set_UI()
|
|
{
|
|
var mapData = table_battlemapconfig.Ins.Get_Data(SelectMapID);
|
|
MoneyForm_Ticket.Set(500 + MyEnumToInt.Ins.Get_Int(mapData.e_Dungeon));
|
|
texts[0].text = mapData.Get_Name();
|
|
var dungeonData = table_dungeonmapconfig.Ins.Get_Data_orNull(mapData.e_Dungeon, SelectLv);
|
|
}
|
|
|
|
public void Select_Dungeon(int mapid)
|
|
{
|
|
var sdata = ServerInfo.Ins.m_ServerData;
|
|
var mapData = table_battlemapconfig.Ins.Get_Data(SelectMapID);
|
|
SelectMapID = mapid;
|
|
SelectMapID.RandomizeCryptoKey();
|
|
SelectLv = sdata.Get_DungeonLv(mapData.e_Dungeon) + 1;
|
|
var dungeonData = table_dungeonmapconfig.Ins.Get_Data_orNull(mapData.e_Dungeon, SelectLv);
|
|
if (DSUtil.CheckNull(dungeonData)) --SelectLv;
|
|
SelectLv.RandomizeCryptoKey();
|
|
|
|
m_ArrowUI.Set(totalcount => { Select_Lv(totalcount); }, SelectLv, true, 1);
|
|
|
|
Set_UI();
|
|
}
|
|
public void Select_Lv(int lv)
|
|
{
|
|
SelectLv = lv; SelectLv.RandomizeCryptoKey();
|
|
}
|
|
|
|
public void OnClick_GoDungeon()
|
|
{
|
|
var mapData = table_battlemapconfig.Ins.Get_Data(SelectMapID);
|
|
// 웨이브는 무한 입장 가능
|
|
if (mapData.n_TicketID == 0 || ServerInfo.Ins.m_ServerData.Check_ItemAmount(mapData.n_TicketID, 1))
|
|
{
|
|
NewGameUI.Ins.m_MapChoiceUI.OnClick_Back();
|
|
|
|
MyValue.MyChoiceMapData.n_Difficult = 1; // TODO 정인호 : 나중에 선택한 난이도 넣어줄 것
|
|
MyValue.MyChoiceMapData.n_MapID = SelectMapID;
|
|
MyValue.MyChoiceMapData.n_PortalIndex = 0;
|
|
MyValue.MyChoiceMapData.n_DungeonLv = SelectLv;
|
|
|
|
InGameInfo.Ins.Load_Map(SelectMapID);
|
|
}
|
|
}
|
|
} |