using UnityEngine;
using System.Collections;

public class PulseTextColorOverTime : MonoBehaviour {

    public float Period = 1.0f;
    public float Intensity = 0.5f;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
        float flIntensity = 1.0f - Intensity * Mathf.PingPong(Time.time, Period);

        gameObject.GetComponent<UnityEngine.UI.Text>().color = new Color(flIntensity, flIntensity, flIntensity);
    }
}
