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

public class MenuController : MonoBehaviour {

	public string LevelToLoad;
	public AudioSource StartHorn;
	public GameObject Plinth;

	public void StartGame()
	{
		StartCoroutine ("DelayStart");
	}

	public void ExitGame()
	{
		Application.Quit ();
	}

	IEnumerator DelayStart()
	{
		StartHorn.Play ();
		Plinth.GetComponent<MeshRenderer> ().enabled = false;
		Plinth.GetComponent<MeshCollider> ().enabled = false;
		yield return new WaitForSeconds (3F);
		SceneManager.LoadScene (LevelToLoad);
	}
}
