using System;
using UnityEngine;

namespace Assets.Source.Misc
{
    public class CollisionDetector : MonoBehaviour
    {
        public Action<Collider2D> OnTEnter2D;
        public Action<Collider2D> OnTExit2D;

        private void OnTriggerEnter2D(Collider2D collision)
        {
            OnTEnter2D?.Invoke(collision);
        }

        private void OnTriggerExit2D(Collider2D collision)
        {
            OnTExit2D?.Invoke(collision);
        }
    }
}
