using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Touching : MonoBehaviour
{
    [HideInInspector]
    public bool touching;

    private void OnTriggerEnter2D(Collider2D _col)
    {
        if( _col.gameObject.layer == LayerMask.NameToLayer("Ground") )
        {
            touching = true;
        }
    }
    private void OnTriggerExit2D(Collider2D _col)
    {
        if (_col.gameObject.layer == LayerMask.NameToLayer("Ground"))
        {
            touching = false;
        }
    }
}
