using UnityEngine;
using System.Collections;

public class DetectiveTalkScript : MonoBehaviour {

	
	public GameObject detective;
	
	public bool talkifGoneRight = true;
	
	private bool talked = false;
	
	public string[] talkMessage;
	
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		if (talkifGoneRight && !talked && detective.transform.position.x >= transform.position.x){
			talked = true;
			detective.GetComponent<DetectiveScript>().Talk(talkMessage);
		}
		
		
	}
}
