using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ButtonManagement : MonoBehaviour {

	public GameObject pausePanel;
	public GameObject overPanel;
	public GameObject pauseButton;


	public void Pause(){
		if (Time.timeScale == 1f) {
			Time.timeScale = 0;
			pausePanel.SetActive (true);
			pauseButton.SetActive (false);
		}

	}
	public void Resume(){
		if (Time.timeScale == 0) {
			Time.timeScale = 1f;
			pausePanel.SetActive (false);
			pauseButton.SetActive (true);
		}
	}
	public void GameOver(){
		if (GameManagement.instance._GameOver) {
			overPanel.SetActive (true);
			Time.timeScale = 0;
		}
	}

	public void GamePlay(){
		Application.LoadLevel ("GamePlay");
		Time.timeScale = 1;
	}

	public void MainMenu(){
		Application.LoadLevel ("StartScene");
		Time.timeScale = 1;
	}

	public void QuitGame(){
		print ("Quit");
		Application.Quit ();
	}

	public void Credit(){		
		Application.LoadLevel ("CREDIT");
		Time.timeScale = 1;
	}
}
