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

public class FocusCam : MonoBehaviour {
	public float FocusTime;
    private float m_FocusTime;
	private Camera m_Camera;
	private Vector3 m_currentPosition;
	private Vector3 m_targetPosition;
	private float m_currentZoom;
	private float m_targetZoom;
	private float DEFAULT_ZOOM = 5.0f;
	private float FOCUS_ZOOM = 4.0f;
	private Vector3 DEFAULT_POSITION = new Vector3(0.0f, 0.0f, -10.0f);
	private float CAM_SPEED = 5.0f;

	// Use this for initialization
	void Start () {
		m_Camera = GetComponent<Camera>();
		m_FocusTime = 0.0f;
	}

	public void SetFocusGameObject(GameObject focusObject) {
		m_targetZoom = FOCUS_ZOOM;
		m_targetPosition = focusObject.transform.position;
		m_targetPosition.z = DEFAULT_POSITION.z;
		m_FocusTime = FocusTime;
	}

	// Update is called once per frame
	void Update () {
/*
		if (m_FocusTime > 0)
        {
			m_FocusTime -= Time.deltaTime;
			m_currentPosition = m_targetPosition;
			m_currentZoom = m_targetZoom;
        }
        else
		{
			m_currentPosition = DEFAULT_POSITION;
			m_currentZoom = DEFAULT_ZOOM;
        }

		transform.position = transform.position +((m_currentPosition-transform.position)*CAM_SPEED * Time.deltaTime);
		m_Camera.orthographicSize = m_Camera.orthographicSize + ((m_currentZoom - m_Camera.orthographicSize)*CAM_SPEED * Time.deltaTime);*/
	}
}
