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

public class Tutorial : MonoBehaviour {

	private CanvasGroup group;

	// Use this for initialization
	void Start () {
		group = GetComponent<CanvasGroup> ();
		StartCoroutine (FadeOutTutorial ());
	}

	// Update is called once per frame
	void Update () {
		
	}

	IEnumerator FadeOutTutorial()
	{
		yield return new WaitForSeconds(4);

		float t = 0;
		while (t < 1) {
			group.alpha = Mathf.Lerp(1, 0, t);
			t += Time.deltaTime;
			yield return null;
		}
	}
}
