예제 #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.GetComponent <dialogBox>() != null)
     {
         dialogTrigger = collision.GetComponent <dialogBox>();
         currentDialog = "something";
         dialogTrigger.showSpeechPrompt();
     }
 }
예제 #2
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.GetComponent <dialogBox>() != null) //only do this for the speakTo trigger boxes not the walkAway trigger boxes
     {
         dialogTrigger = null;
         currentDialog = string.Empty;
     }
     //Stop focusing
     //RemoveFocus();
 }
예제 #3
0
 // Use this for initialization
 void Start()
 {
     accept = false;
     diaBox = FindObjectOfType <dialogBox> ();
 }
예제 #4
0
 // Start is called before the first frame update
 void Start()
 {
     dialogTrigger = null;
 }