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

public class TextAlphaEffect : MonoBehaviour {

	public float speed = 1;

	Text textTarget;

	// Use this for initialization
	void Start () {
		textTarget = GetComponent<Text> ();
	}
	
	// Update is called once per frame
	void Update () {
		textTarget.color = new Color (textTarget.color.r,textTarget.color.g,textTarget.color.b, Mathf.PingPong (Time.time*speed, 1));
	}
}
