1
Fork 0
slime-blood-and-pain/Assets/Scripts/Item.cs

24 lines
600 B
C#
Raw Normal View History

2019-04-28 12:11:21 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Item : Entity
{
2019-04-28 14:28:31 +00:00
public static string itemName = "White Triangle";
2019-04-28 13:29:17 +00:00
protected override void Start() {
base.Start();
2019-04-28 12:11:21 +00:00
overlappable = true;
}
public virtual void OnPickup(Player player) {
Debug.LogWarning("OnPickup not overridden");
2019-04-28 14:28:31 +00:00
messageBar.Write("Picked up: " + itemName, Color.yellow);
Destroy(gameObject);
}
public override void Die() {
messageBar.Write("Destroyed: " + itemName, Color.red);
2019-04-28 13:29:17 +00:00
Destroy(gameObject);
2019-04-28 12:11:21 +00:00
}
}