void OnTriggerEnter2D(Collider2D o)
 {
     if (o.tag == "Player")
     {
         NotificationObject.ChangeText(text);
     }
 }
 void OnTriggerExit2D(Collider2D o)
 {
     if (o.tag == "Player" && NotificationObject.currentText == text)
     {
         NotificationObject.ChangeText("");
     }
 }
Ejemplo n.º 3
0
 public void OnTriggerEnter2D(Collider2D c)
 {
     if (c.tag == "Player")
     {
         entered = true;
         NotificationObject.ChangeText(text);
     }
 }
Ejemplo n.º 4
0
    void Update()
    {
        if (Vector2.Distance(transform.position, player.position) < maxDistance)
        {
            NotificationObject.ChangeText(notificationText, 0);

            if (Input.GetKeyDown(KeyCode.E))
            {
                d.StartDialouge(dialogName);
                NotificationObject.Close();
            }
        }
        else
        {
            if (NotificationObject.currentText == notificationText)
            {
                NotificationObject.Close();
            }
        }
    }