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.
 
 
 
 
 
 

34 lines
752 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class LogicCollectable : Collectable
{
[SerializeField]
protected Inventory.Data Collectable;
[SerializeField]
protected GameObject BlockMenu;
[SerializeField]
protected Text 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);
}
}