using UnityEngine;
using System.Collections;

public class Window : MonoBehaviour {

	public void Open(bool pause) {
		if(pause)
			Time.timeScale = 0;

		GetComponent<CanvasGroup>().alpha = 1f;
		GetComponent<CanvasGroup>().interactable = true;
		GetComponent<CanvasGroup>().blocksRaycasts = true;
	}
	
	public void Close(bool pause) {
		if(pause)
			Time.timeScale = 1;

		GetComponent<CanvasGroup>().alpha = 0;
		GetComponent<CanvasGroup>().interactable = false;
		GetComponent<CanvasGroup>().blocksRaycasts = false;
	}
	
}
