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

public class showText : MonoBehaviour {

	// Use this for initialization
	void Start () {
        GetComponent<MeshRenderer>().enabled = false;
    }
	
	// Update is called once per frame
	void Update () {
        //GetComponent<MeshRenderer>().enabled = false;
	}

    void OnTriggerStay(Collider other)
    {
        if(other.tag=="Player")
        {
            GetComponent<MeshRenderer>().enabled = true;
        }
    }

    private void OnTriggerExit(Collider other)
    {
        if(other.tag=="Player")
        {
            GetComponent<MeshRenderer>().enabled = false;

        }
    }

}
