using UnityEngine;
using System.Collections;

public class Reloader : MonoBehaviour
{
		public string lvl;
		private bool canRestart = false;
		
	void Start ()
		{
				StartCoroutine (WaitForRestart ());
		}

		IEnumerator WaitForRestart ()
		{
				yield return new WaitForSeconds (5);
				canRestart = true;
		
		} 
		void Update ()
		{
				if (Input.anyKeyDown && canRestart) {
						Application.LoadLevel (lvl);
			
				}
		}
}