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

public class CameraManager : MonoBehaviour {
	public GameObject mainCam;
	private BoxCollider easyCP;
	// Use this for initialization
	void Start () {
		easyCP = GetComponent<BoxCollider>();
	}
	
	// Update is called once per frame
	void Update () {
		
	}

	void OnTriggerEnter(Collider other){
		if(other.gameObject.name == "Player"){
			mainCam.transform.Translate(new Vector3(mainCam.transform.localPosition.x, 
													mainCam.transform.localPosition.y + 100, 
													mainCam.transform.localPosition.z));
		}
	}

	void OnTriggerExit(Collider other){
		if(other.gameObject.name == "Player"){
			easyCP.isTrigger = false;
		}
	}
}
