EnergyOrb.cs 263 B

12345678910111213
  1. using UnityEngine;
  2. public class EnergyOrb : MonoBehaviour
  3. {
  4. private void OnTriggerEnter(Collider other)
  5. {
  6. if (other.CompareTag("Player"))
  7. {
  8. GameManager.Instance.CollectOrb();
  9. Destroy(gameObject);
  10. }
  11. }
  12. }