using UnityEngine;
using System.Collections;

public class Dispear : MonoBehaviour {
	
	public float delay = 3;
	public Color begin, end;
	public Material mat;
	
	// Use this for initialization
	IEnumerator Start () {
		float t = delay;
		
		while(t>0) {
			t -= Time.deltaTime;
			
			mat.SetColor("_TintColor",Color.Lerp(end, begin, t));
			
			
			yield return null;
		}
		
		
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
