23 lines
618 B
C#
23 lines
618 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using TMPro;
|
|
using UnityEngine.Events;
|
|
|
|
namespace AibisDream
|
|
{
|
|
public class ShapeCreateButton : MonoBehaviour
|
|
{
|
|
[SerializeField] private Image _image;
|
|
[SerializeField] private TMP_Text _text;
|
|
[SerializeField] private Button _button;
|
|
|
|
public UnityEvent OnClicked => _button.onClick;
|
|
|
|
public void SetInfo(BlockShapeInfo blockShapeInfo)
|
|
{
|
|
_image.sprite = blockShapeInfo.GetButtonImage();
|
|
_text.text = blockShapeInfo.shapeName;
|
|
gameObject.name = blockShapeInfo.shapeName;
|
|
}
|
|
}
|
|
} |