24 lines
No EOL
612 B
C#
24 lines
No EOL
612 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class EntityItem : Entity
|
|
{
|
|
public static string itemName = "White Triangle";
|
|
|
|
protected override void Start() {
|
|
base.Start();
|
|
overlappable = true;
|
|
}
|
|
|
|
public virtual void OnPickup(EntityPlayer player) {
|
|
Debug.LogWarning("OnPickup not overridden");
|
|
messageBar.Write("Picked up: " + itemName, Color.yellow);
|
|
Destroy(gameObject);
|
|
}
|
|
|
|
public override void Die() {
|
|
messageBar.Write("Destroyed: " + itemName, Color.red);
|
|
Destroy(gameObject);
|
|
}
|
|
} |