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

public class Ready : MonoBehaviour {
	public GameObject p1X;
	public GameObject p2X;

	bool p1Ready;
	bool p2Ready;
	// Use this for initialization
	void Start () {
		p1Ready = false;
		p2Ready = false;
		p1X.SetActive (false);
		p2X.SetActive (false);
	}
	
	// Update is called once per frame
	void Update () {
		if (Input.GetButtonDown ("P1 start")) {
			p1Ready = true;
			p1X.SetActive (true);
		}

		if (Input.GetButtonDown ("P2 start")) {
			p2Ready = true;
			p2X.SetActive (true);
		}

		if (p1Ready && p2Ready) {
			SceneManager.LoadScene("LevelSelect");
		}
	}
}
