Ejemplo n.º 1
0
 public void OnTriggerExit2D(Collider2D c)
 {
     if (c.tag == "Player")
     {
         entered = false;
         NotificationObject.Close();
     }
 }
Ejemplo n.º 2
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();
            }
        }
    }