using UnityEngine;
using System.Collections;

public class Name : MonoBehaviour {
	
	TextMesh _textMesh;
	// Use this for initialization
	void Start () {
		_textMesh = transform.GetComponent<TextMesh>();
		Color c = _textMesh.renderer.material.color;
		c.a = 0.0f;
		_textMesh.renderer.material.color = c;
	}
	
	// Update is called once per frame
	void Update () {
	
		Color c = _textMesh.renderer.material.color;
		c.a = Mathf.Lerp(c.a, Globals.FallenIn ? 1.0f : 0.0f, 5.0f * Time.deltaTime);
		_textMesh.renderer.material.color = c;
		
	}
}
