Added NoTrail, Slowmotion and BulletFreezeRemove Pickups
Also refactored Extinguisher to remove particles from the end (still wonky though)
This commit is contained in:
@@ -4,6 +4,7 @@ using UnityEngine;
|
||||
|
||||
public class Pickup : MonoBehaviour
|
||||
{
|
||||
protected bool pickedUp = false;
|
||||
public virtual void OnPickup()
|
||||
{
|
||||
|
||||
@@ -14,8 +15,18 @@ public class Pickup : MonoBehaviour
|
||||
Debug.Log("Pickup");
|
||||
if (other.gameObject.tag == "Player")
|
||||
{
|
||||
pickedUp = true;
|
||||
OnPickup();
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
//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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user