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

public class MainMenu : MonoBehaviour {

	private GameObject startButton;
	private GameObject quitButton;
	private GameObject instrButton;
	private GameObject instrText;
	private GameObject backButton;

	// Use this for initialization
	void Start () {
		startButton = GameObject.Find("Start Game");
		quitButton = GameObject.Find("Quit Game");
		instrButton = GameObject.Find("Instruction Button");
		instrText = GameObject.Find("Instructions");
		backButton = GameObject.Find("Back");
		backButton.SetActive(false);
		instrText.SetActive(false);
	}
	
	// Update is called once per frame
	void Update () {

	}

	public void StartGame(){
		UnityEngine.SceneManagement.SceneManager.LoadScene(1);
	}

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

	public void Instructions(){
		startButton.SetActive(false);
		quitButton.SetActive(false);
		instrButton.SetActive(false);
		instrText.SetActive(true);
		backButton.SetActive(true);
	}

	public void Back(){
		startButton.SetActive(true);
		quitButton.SetActive(true);
		instrButton.SetActive(true);
		instrText.SetActive(false);
		backButton.SetActive(false);
	}
}
