You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/Source/Scripts/MenuUIButton.cs

20 lines
569 B
C#

2 months ago
using DG.Tweening;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class MenuUIButton : MonoBehaviour
{
[SerializeField] private Button button;
[SerializeField] private TextMeshProUGUI priceText;
[SerializeField] private TextMeshProUGUI levelText;
public Button Button => button;
public TextMeshProUGUI PriceText => priceText;
public TextMeshProUGUI LevelText => levelText;
private void OnEnable()
{
Button.onClick.AddListener(() => transform.DOPunchScale(Vector3.one * .2f, .4f, 1, 1).SetRelative());
}
}