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

using UnityEngine.UI;

public class SpaceToRestart : MonoBehaviour {

	bool canSkip = false;
	public Text text;

	void Start() {
		StartCoroutine (canPress ());
		text.text = string.Format(text.text, PlayerPrefs.GetString("weapon"));
	}

	void Update () {
		if(Input.anyKeyDown && canSkip) {
			Application.LoadLevel (1);
		}
	}
	IEnumerator canPress() {
		yield return new WaitForSeconds (3);
		canSkip = true;
	}
}
