﻿using UnityEngine;
using System.Collections;

public class camera_ex02 : MonoBehaviour {

	public GameObject		Claire;
	public GameObject		John;
	public GameObject		Thomas;
	
	public GameObject		activePlayer;
	// Use this for initialization
	void Start () {
		activePlayer = Thomas;
	}
	
	// Update is called once per frame
	void Update () {
		gameObject.transform.position = new Vector3 (activePlayer.transform.position.x, activePlayer.transform.position.y + 2f, -10f);
		if (Input.GetKeyDown ("1")) {
			activePlayer = Thomas;
		} else if (Input.GetKeyDown ("2")) {
			activePlayer = John;
		} else if (Input.GetKeyDown ("3")) {
			activePlayer = Claire;
		} else if (Input.GetKeyDown ("r")) {
			Application.LoadLevel (Application.loadedLevel); 
		}
	}
}
