using UnityEngine;
using UnityEngine.SceneManagement;
public class GameManeger : MonoBehaviour {
	public float restartdelay = 1f;
	bool gamehasEnded = false ;
	public GameObject levelcompleteUI;
	public void Completelevel ()
	{
		levelcompleteUI.SetActive (true);
	}
	public void endgame ()
	{
		if (gamehasEnded == false) {
			gamehasEnded = true;
			Debug.Log ("Game Over");
			Invoke ("Restart", restartdelay);
		}
	}
	void Restart()
	{
		SceneManager.LoadScene (SceneManager.GetActiveScene ().name);
	}
}
