// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0) && !DialogueScript.showingDialogue) { if (dialogueCollection.GetDialogueType(index) == "YES_NO") { DialogueScript.PopUpDialogue(dialogueCollection.GetDialogueTitle(index), dialogueCollection.GetDialogueText(index), DialogueScript.DialogueType.YesNoDialogue, PressYes, PressNo); } else if (dialogueCollection.GetDialogueType(index) == "OK") { DialogueScript.PopUpDialogue(dialogueCollection.GetDialogueTitle(index), dialogueCollection.GetDialogueText(index), DialogueScript.DialogueType.OKDialogue, null, null); } } }