Files
bullet-hell-jam-2022/Assets/Scripts/Game/Pickup.cs
Minzkraut 095fc0742b Added NoTrail, Slowmotion and BulletFreezeRemove Pickups
Also refactored Extinguisher to remove particles from the end (still wonky though)
2022-04-19 23:22:24 +02:00

33 lines
718 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Pickup : MonoBehaviour
{
protected bool pickedUp = false;
public virtual void OnPickup()
{
}
public void OnTriggerEnter(Collider other)
{
Debug.Log("Pickup");
if (other.gameObject.tag == "Player")
{
pickedUp = true;
OnPickup();
}
}
//Draw text gizmo in editor to show class name
void OnDrawGizmos()
{
//get curren class name
string className = this.GetType().ToString();
GUI.color = Color.blue;
UnityEditor.Handles.Label(transform.position, className);
}
}