- using UnityEngine;
- using UnityEngine.UI;
- public class Orb : MonoBehaviour
- {
- private void OnTriggerEnter(Collider other)
- {
- if(other.gameObject.name == "Player")
- {
- Debug.Log("Player collected an orb");
- GameManager.gameManagerInstance.IncreaseOrbCounter();
- Destroy(gameObject);
- }
- }
- }
|