using UnityEngine;

public class Pause : MonoBehaviour {

    public GameObject PauseScreen;

    private bool _isPaused = false;

	void Update () {
	    if (Input.anyKeyDown)
        {
            _isPaused = !_isPaused;
            PauseScreen.SetActive(_isPaused);
            Time.timeScale = (Time.timeScale == 0) ? 1 : 0;
        }
	}
}
