using UnityEngine;
using System.Collections;

public class GameOverScreen : MonoBehaviour
{
	public static GameOverScreen instance { get; private set; }

	void Awake()
	{
		instance = this;
	}

	public void toggleScreenVisibility(bool isVisible)
	{
		CanvasGroup grp = GetComponent<CanvasGroup>();
		grp.alpha = isVisible ? 1.0f : 0.0f;
		grp.interactable = grp.blocksRaycasts = isVisible;
	}

	public void RetryButtonClicked()
	{
		AudioController.instance.playSFX(AudioController.audioClips.click);
		GameManager.instance.changeState(GameManager.GameState.InitialSetup);
	}
}
