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

public class ClickRestart : MonoBehaviour {
	public Sprite up;
	public Sprite down;
	SpriteRenderer graphic;
	public bool quitInstead;

	// Use this for initialization
	void Start () {
		graphic = GetComponent<SpriteRenderer> ();
	}
	
	// Update is called once per frame
	void Update () {
		
	}

	void OnMouseDown() {
		graphic.sprite = down;
	}

	void OnMouseUp() {
		graphic.sprite = up;
		if (quitInstead) {
			Application.Quit ();
		} else {
			SceneManager.LoadScene ("SampleScene", LoadSceneMode.Single);
		}
	}
}
