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

18 lines
408 B
C#

3 months 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);
}
}