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

public class loadLevel : MonoBehaviour {

    public void LoadNextLevel(string levelName)
    {
        Application.LoadLevel(levelName);
    }

    public void OnTriggerEnter2D(Collider2D other)
    {
        if(Application.loadedLevelName == "Level")
        {
            Application.LoadLevel("Restart");
        }
    }
    // Use this for initialization
    void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}
}
