using System;
using UnityEngine;

public class PickUp : MonoBehaviour
{
    private GameManager gameManager;

    private void Start()
    {
        gameManager = GameObject.Find("Game Manager").GetComponent<GameManager>();
    }

    private void OnCollisionEnter(Collision other)
    {
        if (other.gameObject.CompareTag("Orb"))
        {

            gameManager.UpdateCollectedOrbs();
            Destroy(other.gameObject);
            
        }
       
        
    }
}
