using UnityEngine;
using UnityEngine.UI;

public class ShowTutorialHint : MonoBehaviour {
	public string MessageText;
	public Text targetTextControl;

	private bool messageShown = false;


	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	void OnTriggerEnter2D(Collider2D collider) {

		if (!messageShown) {
			if (collider.gameObject.layer == 9) {
				targetTextControl.text = MessageText;
				targetTextControl.gameObject.SetActive (true);
			}
			messageShown = true;
		}
	}
}
