using UnityEngine;

public class EnableCompare : MonoBehaviour
{
    [SerializeField] private GameObject toEnable;
    [SerializeField] private float threshold = 20f;

    public void EnableIfLess(float value)
    {
        if (value < threshold)
        {
            toEnable.SetActive(true);
        }
    }

    public void EnableIfGreater(float value)
    {
        if (value > threshold)
        {
            toEnable.SetActive(true);
        }
    }
}