using UnityEngine;
using System.Collections;

public class counterInteraction: MonoBehaviour {
	public Camera mainCamera;
	public Camera counterCamera;
	public int ActiveCam = 0;
	public GameObject player;

	// Use this for initialization
	void Start () {
		player = GameObject.Find ("Chef!");
	}

	void OnMouseDown ()
	{
		switch (ActiveCam) {
				case 0:
			Debug.Log ("Main Camera Deactivated");
			if (ActiveCam == 0)
			{
					ActiveCam = 1;
						mainCamera.enabled = !mainCamera.enabled;
						counterCamera.enabled = true;
				player.renderer.enabled = false;
			if(player.GetComponent<CharacterMotor>())
			{
				player.GetComponent<CharacterMotor>().enabled = false;
			}
			}
						break;
				case 1:
			Debug.Log ("Trash Camera Deactivated");
			if (ActiveCam == 1)
			{
			ActiveCam = 0;
						counterCamera.enabled = !counterCamera.enabled;
						mainCamera.enabled = true;
				player.renderer.enabled = true;
						if(player.GetComponent<CharacterMotor>())
			{
				player.GetComponent<CharacterMotor>().enabled = true;
			}
			}
			break;
				}
	}
}