using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class VegetableSpawner : MonoBehaviour {
|
|
|
|
public Vegetable thisVeg;
|
|
public void OnCollisionEnter(Collision other)
|
|
{
|
|
if (other.gameObject.tag == "Player")
|
|
{
|
|
Debug.Log("BUMP");
|
|
other.gameObject.GetComponent<LocalPlayer>().PickupVeggie(thisVeg);
|
|
}
|
|
}
|
|
}
|