Pedro Sangue3 Gomes 3fe65ec877 first commit
2019-12-02 22:36:04 +00:00

25 lines
482 B
C#

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);
}
}
}