63 lines
2.1 KiB
C#
63 lines
2.1 KiB
C#
using CodeStage.AntiCheat.ObscuredTypes;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
|
|
public class MapChoiceUI_Dungeon : uScrollViewMgr
|
|
{
|
|
public static MapChoiceUI_Dungeon Ins;
|
|
|
|
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_UI();
|
|
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);
|
|
texts[0].text = mapData.Get_Name();
|
|
var dungeonData = table_dungeonmapconfig.Ins.Get_Data_orNull(mapData.e_Dungeon, SelectLv);
|
|
var sdata = ServerInfo.Ins.m_ServerData;
|
|
// TODO 정인호 : 서버에 현재 클리어 정보 있어야 함
|
|
}
|
|
|
|
public void Select_Dungeon(int mapid)
|
|
{
|
|
SelectMapID = mapid; SelectMapID.RandomizeCryptoKey();
|
|
SelectLv = 1; // ServerInfo.Ins.get_ // TODO 정인호 : 던전 레벨
|
|
|
|
var mapData = table_battlemapconfig.Ins.Get_Data(SelectMapID);
|
|
var datas = table_dungeonmapconfig.Ins.Get_DataList(mapData.e_Dungeon);
|
|
m_ArrowUI.Set(totalcount => { Select_Lv(totalcount); }, datas.Count);
|
|
|
|
Set_UI();
|
|
}
|
|
public void Select_Lv(int lv)
|
|
{
|
|
SelectLv = lv; SelectLv.RandomizeCryptoKey();
|
|
}
|
|
|
|
public void OnClick_GoDungeon()
|
|
{
|
|
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);
|
|
}
|
|
} |