using UnityEngine;
using System.Collections;

public class GameOverMenu : MonoBehaviour {

	public bool isGameOver;
	public GameObject mainMenu;
	public UITexture backGround;
	public GameObject menu;

	void OnEnable(){
		if(isGameOver){
			Invoke("GameOver",2);
		}
	}

	void GameOver(){
		menu.SetActive(true);
	}

	public void RetryButton(){
		backGround.mainTexture=Resources.Load("Textures/Welcome2") as Texture2D;
		mainMenu.SetActive(true);
		if(isGameOver){
			menu.SetActive(false);
		}
		gameObject.SetActive(false);
	}
	

}
