using UnityEngine;
using System.Collections;

public class bounds : MonoBehaviour {
	public Transform camera;
	public Vector3 offset;
	// Use this for initialization
	void Start () {
		//camera = this.GetComponent<Camera> ();
	}
	
	// Update is called once per frame
	void Update () {
		transform.position = new Vector3 (camera.position.x, camera.position.y - offset.y, camera.position.z);
	}
	void OnCollisionEnter2D(Collision2D other){
		if (other.gameObject.tag == "Player") {
			Destroy (other.gameObject);
			Application.LoadLevel ("level");
		}
	}
}
