You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
400 B

  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class VegetableSpawner : MonoBehaviour {
  5. public Vegetable thisVeg;
  6. public void OnCollisionEnter(Collision other)
  7. {
  8. if (other.gameObject.tag == "Player")
  9. {
  10. Debug.Log("BUMP");
  11. other.gameObject.GetComponent<LocalPlayer>().PickupVeggie(thisVeg);
  12. }
  13. }
  14. }