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