using UnityEngine;
using System.Collections;

namespace Pix.Samples.TopDown
{
	public class TrailFader : Fader
	{
		public LineRenderer LineRenderer;
		
		protected override void HandleFade(float progress)
		{
		    var lineRendererStartColor = LineRenderer.startColor;
		    var lineRendererEndColor = LineRenderer.endColor;
		    lineRendererStartColor.a = progress;
		    lineRendererEndColor.a = progress;
		    LineRenderer.startColor = lineRendererStartColor;
		    LineRenderer.endColor = lineRendererEndColor;
/*		    var color = Color.white;
			color.a = progress;
			LineRenderer.SetColors(color, color);
*/		}
	}
}