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/UpgradeItemUI.cs

18 lines
408 B
C#

1 month ago
using UnityEngine;
using UnityEngine.UI;
public class UpgradeItemUI : MonoBehaviour
{
[SerializeField] private Image itemIcon;
[SerializeField] private Image lockIcon;
public void Init(Sprite icon, bool isUnlocked)
{
itemIcon.sprite = icon;
lockIcon.gameObject.SetActive(isUnlocked);
}
public void Unlock()
{
lockIcon.gameObject.SetActive(false);
}
}