You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
572 B

using UnityEngine;
using TMPro;
public class LogicCollectable : Collectable
{
[SerializeField]
protected Inventory.Data Collectable;
[SerializeField]
protected GameObject BlockMenu;
[SerializeField]
protected TextMeshProUGUI popUpText;
public override void OnCollect(Character character)
{
character.Inventory.Add(Collectable);
if (BlockMenu != null)
{
BlockMenu.SetActive(true);
popUpText.text = Collectable.element.DisplayName.ToUpper();
}
Destroy(gameObject);
}
}