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.
 
 
 
 
 
 

35 lines
773 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
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);
Debug.Log("You picked up the new coding block " + Collectable.element.DisplayName + "!");
popUpText.text = Collectable.element.DisplayName.ToUpper();
}
Destroy(gameObject);
}
}