﻿using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class TextFade : MonoBehaviour {
	
	public float alpha = 0f;
	private Text txt;
	// Use this for initialization
	void Start () {
		txt = this.GetComponent<Text> ();
	}
	
	// Update is called once per frame
	void Update () {

		alpha = txt.color.a;
		if (alpha > 0)
		{
			//txt.color = new Color(0,0,0, (alpha - 5f) * Time.deltaTime);
		}
		//txt.fontSize = txt.fontSize + Random.Range (-3, 3);
	}
}
