using UnityEngine; public class BaseItem : MonoBehaviour, IInteractable { [SerializeField] private float _scoreAdd = 0; protected ScoreController _scoreController; protected virtual void Awake() { _scoreController = FindObjectOfType(); } public virtual void Interact() { if (_scoreAdd > 0) _scoreController.AddScore(_scoreAdd, true); Destroy(gameObject); } }