using UnityEngine; namespace Interactable.Interactor { [RequireComponent(typeof(Collider2D), typeof(Rigidbody2D))] public class ColliderTriggerInteractor : MonoBehaviour { protected IInteractable interactable = null; protected virtual void Start() { interactable = GetComponent(); GetComponent().isTrigger = true; GetComponent().isKinematic = true; } protected virtual void OnTriggerEnter2D(Collider2D other) => interactable.Interact(); } }