Project_WL/Assets/ResWork/UIPrefabs/Map/WorldMapDungeonCard.cs

30 lines
956 B
C#
Raw Normal View History

2025-01-22 06:03:38 +00:00
using TMPro;
2025-02-18 01:55:30 +00:00
using UnityEngine;
2025-01-22 06:03:38 +00:00
using UnityEngine.UI;
public class WorldMapDungeonCard : CardBase
{
public Image[] images; // 0 던전 아이콘
2025-02-18 01:55:30 +00:00
public TextMeshProUGUI[] texts_on, texts_off; // 0 던전이름, 1 던전 설명
public GameObject[] gos_onoff; // 0 off, 1 on
2025-01-22 06:03:38 +00:00
2025-01-22 07:20:20 +00:00
int m_DungeonMapID;
2025-01-22 06:03:38 +00:00
public override void Set<T>(T _base)
{
base.Set(_base);
m_DungeonMapID = (int)DSUtil.StringToEnum<eDungeon>(_base.ToString()) + 1000;
2025-01-22 07:20:20 +00:00
var Tdata = table_battlemapconfig.Ins.Get_Data(m_DungeonMapID);
2025-02-18 01:55:30 +00:00
texts_on[0].text = texts_off[0].text = Tdata.Get_Name();
texts_on[1].text = texts_off[1].text = Tdata.Get_Desc();
DSUtil.InActivateGameObjects(gos_onoff, 0);
2025-01-22 06:03:38 +00:00
}
public override int Get_IntData() { return m_DungeonMapID; }
2025-01-22 06:03:38 +00:00
public void OnClick_Card()
{
MapChoiceUI_Dungeon.Ins.Select_Dungeon(m_DungeonMapID);
2025-02-18 01:55:30 +00:00
DSUtil.InActivateGameObjects(gos_onoff, 1);
2025-01-22 06:03:38 +00:00
}
}