mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 11:17:14 +08:00
24 lines
662 B
C#
24 lines
662 B
C#
|
|
using Data;
|
||
|
|
using Managers;
|
||
|
|
using TMPro;
|
||
|
|
using UnityEngine;
|
||
|
|
using UnityEngine.UI;
|
||
|
|
|
||
|
|
namespace UI
|
||
|
|
{
|
||
|
|
public class MapViewUI:MonoBehaviour
|
||
|
|
{
|
||
|
|
public TMP_Text text;
|
||
|
|
public Image icon;
|
||
|
|
public DimensionDef DimensionDefine;
|
||
|
|
|
||
|
|
public void Init(DimensionDef dimensionDef)
|
||
|
|
{
|
||
|
|
if (dimensionDef == null) return;
|
||
|
|
text.text = $"<color=yellow>{dimensionDef.label}</color>\n{dimensionDef.description}";
|
||
|
|
if (!string.IsNullOrEmpty(dimensionDef.icon))
|
||
|
|
icon.sprite = PackagesImageManager.Instance.GetSprite(dimensionDef.icon);
|
||
|
|
DimensionDefine=dimensionDef;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|