22 lines
401 B
C#
22 lines
401 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Pickup : MonoBehaviour
|
|
{
|
|
public virtual void OnPickup()
|
|
{
|
|
|
|
}
|
|
|
|
public void OnTriggerEnter(Collider other)
|
|
{
|
|
Debug.Log("Pickup");
|
|
if (other.gameObject.tag == "Player")
|
|
{
|
|
OnPickup();
|
|
Destroy(gameObject);
|
|
}
|
|
}
|
|
}
|