using UnityEngine;
using System.Collections;

public class Pause : MonoBehaviour {
    public Transform backtomenu;

    private Vector3 worldPos;
	// Update is called once per frame
	void Update () {
        if(Input.GetMouseButtonDown(0))
        {
            worldPos = camera.ScreenToWorldPoint(Input.mousePosition);
            if (backtomenu.collider2D.OverlapPoint(worldPos))
            {
                Application.LoadLevel(0);
            }
        }
	}
}
