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

public class T_BackToMenu : MonoBehaviour
{

    public float transitionTime = 0.0f;

    void OnTriggerEnter2D(Collider2D other)
    {
        StartCoroutine(LoadScene());
    }

    IEnumerator LoadScene()
    {
        yield return new WaitForSeconds(transitionTime);
        SceneManager.LoadScene("Game");
    }
}
