public void OnTriggerStay2D(Collider2D other) { if (!isDialogDisplayed && other.gameObject.tag == "Player") { isDialogDisplayed = true; Vector3 pos = Camera.main.WorldToScreenPoint(transform.position); pos.y += dialogAbovePosition; ChatBackground.position = pos; dialogSystem.EnterRangeOfNPC(); dialogSystem.dialogLines = sentences; dialogSystem.TriggerDialog(); } }