using System.Collections; using System.Collections.Generic; using UnityEngine; public class Pickup : MonoBehaviour { public GameEventFloat onPickupEvent; [Space] [Space] [Space] [Space] [SerializeField] private float pickupAmount; private void OnTriggerEnter(Collider other) { if(other.gameObject.tag == "Player") { onPickupEvent.Raise(pickupAmount); this.gameObject.SetActive(false); } } }