К примеру надо что бы, если Vector3(1) стали Vector3(5), то значение camerago.orthographicSize (то есть zoom), плавно изменилось на 10.
using UnityEngine;
using System.Collections;
public class Eat : MonoBehaviour
{
public string Tag;
public float Increase;
private static Vector3 newScale = new Vector3 (1,1,1);
public Camera camerago;
float zoom = 5;
void Update()
{
transform.localScale = Vector3.Lerp (transform.localScale, newScale, Time.deltaTime * 2);
camerago.orthographicSize = zoom;
/*if (newScale == new Vector3 (10,10,10))
{
zoom = 10 * Time.deltaTime;
}*/
}
void OnTriggerEnter(Collider other)
{
if(other.gameObject.tag == Tag)
{
newScale = transform.localScale + new Vector3(Increase,Increase,Increase);
Destroy(other.gameObject);
}
}
}