屏幕问题
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user