using UnityEngine;
using System.Collections;

public class PauseMenuScript : MonoBehaviour {
    [SerializeField]
    GameObject _pauseMenu;
    bool gamePaused;
	// Use this for initialization
	void Start () {
        gamePaused = false;
	}
	
	// Update is called once per frame
	void Update () {
        if (Input.GetKeyDown(KeyCode.P)) {
            UnityEngine.Cursor.visible = !UnityEngine.Cursor.visible;
            _pauseMenu.SetActive(!_pauseMenu.activeSelf);
            Time.timeScale = 1-Time.timeScale;
            gamePaused = !gamePaused;
        }
	}

    public bool paused() {
        return gamePaused;
    }

    
}
