Orb.cs 356 B

123456789101112131415161718
  1. using UnityEngine;
  2. using Game;
  3. [RequireComponent(typeof(Collider2D))]
  4. public class Orb : MonoBehaviour
  5. {
  6. [SerializeField] private OrbType _type;
  7. public OrbType Type => _type;
  8. private Collider2D _collider;
  9. private void Awake() => _collider = GetComponent<Collider2D>();
  10. public void Deactivate() => _collider.enabled = false;
  11. }