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

public class Sprout : MonoBehaviour {

    public Vector3 finalSize = Vector3.one;
    public float animLength;

	void Start ()
    {
        transform.localScale = Vector3.zero;
        StartCoroutine(Grow());
	}
    
    IEnumerator Grow()
    {
        for (float t = 0; t < animLength; t += Time.deltaTime)
        {
            transform.localScale = Vector3.Lerp(Vector3.zero, finalSize, t);
            yield return new WaitForEndOfFrame();
        }
        transform.localScale = finalSize;
    }
}
