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

32 lines
841 B
C#

3 months ago
using D2D;
using D2D.Utilities;
using DG.Tweening;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using static D2D.Utilities.CommonGameplayFacade;
public class CharacterItemUI : Unit
{
[SerializeField] private TextMeshProUGUI memberName;
[SerializeField] private Image memberIcon;
[SerializeField] private Image background;
[SerializeField] private Image LockImage;
[SerializeField] private Image LockedLayer;
[SerializeField] private Image availableImage;
public void Init(MemberUpgrades member)
{
memberName.text = member.UpgradeText;
memberIcon.sprite = member.SilhouetteIcon;
LockedLayer.sprite = member.SilhouetteIcon;
}
public void Unlock()
{
LockImage.DOFade(0, 0);
LockedLayer.DOFade(0, 0);
availableImage.gameObject.On();
}
}