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

public class ShowTxtLoad : MonoBehaviour {
	GUIStyle msgStyle = new GUIStyle();
	public string levelToLoad;
	public TextAsset textToShow;


	void Start () {
		msgStyle.normal.textColor = Color.white;
		msgStyle.fontSize = 30;
		msgStyle.alignment = TextAnchor.MiddleCenter;
		msgStyle.font = GameController.font;
	}
	
	// Update is called once per frame
	void Update () {
		if(Input.GetButtonDown("Interact")){
			Application.LoadLevel (levelToLoad);
		}
	}

	void OnGUI(){
		GUI.Label(new Rect(0,0,Screen.width,Screen.height), textToShow.text,msgStyle);

	}
}
