using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;

public class TitleScreenManager : MonoBehaviour {

	#region Private Variables
	private Animator _anim;
	private bool isLeaving = false;
	#endregion


	#region Events
	void Awake () {

		_anim = GetComponent <Animator> ();

	}

	void Update () {

		if (Input.GetMouseButtonDown (0)) {
			_anim.SetTrigger ("FadeOut");
			isLeaving = true;
			Invoke ("GoToGame", 2f);
		}

	}
	#endregion


	#region Methods
	void GoToGame () {

		SceneManager.LoadScene ("Main Scene");

	}
	#endregion

}
