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

public class DeadZone : MonoBehaviour
{
    private void OnTriggerEnter2D(Collider2D _col)
    {
        if(_col.CompareTag("Player"))
        {
            Destroy(_col.gameObject, 0.1f);
            SceneManager.LoadSceneAsync("MainMenu");
        }
    }
    private void OnTriggerExit2D(Collider2D _col)
    {
        if (_col.CompareTag("Player"))
        {
            Destroy(_col.gameObject, 0.1f);
            SceneManager.LoadSceneAsync("MainMenu");
        }
    }
}
