using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class text_pulse : MonoBehaviour {

    public Material defaultMaterial, pulseMaterial;
    Renderer rend;

    public float speed;
    
    void Start ()
    {
        rend = GetComponent<Renderer>();
        rend.material = defaultMaterial;
	}

    void Update()
    {
        float lerp = Mathf.Sin(Time.time);
        rend.material.Lerp(defaultMaterial, pulseMaterial, Mathf.Sin(Time.time) * speed);
    }
}
