using System;
using UnityEngine;

public class MagnetTrigger : MonoBehaviour
{
    public event Action<Collider> OnTrigger;

    public void SetRadius(float radius)
    {
        SphereCollider collider = GetComponent<SphereCollider>();
        if (collider != null) collider.radius = radius;
    }

    private void OnTriggerEnter(Collider other)
    {
        OnTrigger?.Invoke(other);
    }
}
