using System; using UnityEngine; namespace NEG.UI.UnityUi.Buttons { [RequireComponent(typeof(BaseButton))] public abstract class ButtonReaction : MonoBehaviour { private void Awake() => GetComponent().OnButtonPressed += OnClicked; private void OnDestroy() => GetComponent().OnButtonPressed -= OnClicked; protected abstract void OnClicked(); } }