using UnityEngine;
using UnityEngine.SceneManagement;

public class GameOver : MonoBehaviour 
{
    public Transform GameOverBanner;

    void Start()
    {
        if(GameOverBanner != null)
            GameOverBanner.gameObject.SetActive(true);
    }

	void Update() 
	{
        if(Input.GetKeyDown(KeyCode.Space))
        {
            Restart();
        }
	}
	
	void Restart() 
	{
        GameProgress.HandleRestart();
        SceneManager.LoadScene(GameProgress.RetryFromScene);
    }
 
}
