using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpannerPickUp : MonoBehaviour {
public int Value;
public GameObject pickUpEffect;
private void OnTriggerEnter(Collider other)
{
if (other.tag == "Player")
{
FindObjectOfType<GameManager>().AddSpanner(Value);
//this new instance needs to move to a specific position
Instantiate(pickUpEffect, transform.position, transform.rotation);
Destroy(gameObject);
}
}
}