31 lines
699 B
C#
31 lines
699 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
using UnityEngine.UI;
|
|
|
|
namespace DDD
|
|
{
|
|
public class ItemSlotUi : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private Button _button;
|
|
|
|
[SerializeField]
|
|
private Image _itemImage;
|
|
|
|
[SerializeField]
|
|
private TextMeshProUGUI _quantityText;
|
|
|
|
[SerializeField]
|
|
private Image _markImage;
|
|
|
|
private ItemData _itemData;
|
|
|
|
public void Initialize(UnityAction buttonEvent, string itemKey)
|
|
{
|
|
_button.onClick.AddListener(buttonEvent);
|
|
|
|
_itemData = DataManager.Instance.ItemDataSo.GetDataById(itemKey);
|
|
}
|
|
}
|
|
} |