using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class MoviePlayer : MonoBehaviour {

	// Use this for initialization
	void Start () {
		((MovieTexture)GetComponent<RawImage>().texture).Play();
	}
	
	// Update is called once per frame
	void Update () {
		if (Input.GetKey("escape") || !((MovieTexture)GetComponent<RawImage>().texture).isPlaying)
			Application.LoadLevel (0);
	}
}
