void SetTownDialogue(TownDialogue twndia) { toSet.text.AddRange(twndia.text); toSet.talker.AddRange(twndia.talker); toSet.yesNo = twndia.yesNo; transform.parent.gameObject.SetActive(false); if (twndia.yesDialogue != null) { yesDialogue = twndia.yesDialogue; noDialogue = twndia.noDialogue; } }
void OnTriggerStay(Collider other) { if (on == true) { if (other.tag == "Player") { if (Input.GetButtonDown("Confirm")) { manager.dialogue.SetActive(true); TownDialogue twndia = manager.dialogue.transform.GetChild(3).GetComponent <TownDialogue>(); twndia.text.Clear(); twndia.text.AddRange(txt); twndia.talker.Clear(); twndia.talker.AddRange(talker); twndia.yesNo = yesNo; selecter.yesDialogue = yesDialogue; selecter.noDialogue = noDialogue; twndia.first = true; on = false; } } } }