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

public class CameraLevel1 : MonoBehaviour {
	bool etat = true;
	// Update is called once per frame
	void Update () {
		if (Input.GetButtonDown ("Fire1")) {
			GameObject PointOfVue;
			if (etat) {
				PointOfVue = GameObject.Find ("Background2");
			} else {
				PointOfVue = GameObject.Find ("Background");
			}
			this.transform.position = PointOfVue.transform.position;
			etat = !etat;
			GameObject p = GameObject.Find ("Player");
			PlayerScript skript = (PlayerScript) p.GetComponent(typeof(PlayerScript));
			skript.focus = !skript.focus;
			p = GameObject.Find ("Player2");
			skript = (PlayerScript) p.GetComponent(typeof(PlayerScript));
			skript.focus = !skript.focus;
		}
	}
}
