using UnityEngine;
using System.Collections;

namespace uTools
{
    [AddComponentMenu("uTools/Tween/Tween Camera View(uTools)")]
    public class uTweenCameraView : uTweenValue
    {
        Camera Camera;

        Camera m_camera
        { 
            get 
            {
                if (null == Camera)
                    Camera = this.GetComponent<Camera>();
                return Camera;
            }
        }

        float cameraView
        {
            get
            {
                return m_camera.orthographicSize;
            }
            set
            {
                m_camera.orthographicSize = value;
            }
        }

        protected override void ValueUpdate(float value, bool isFinished)
        {
            cameraView = value;
        }
    }
}
