public IEnumerator RunDialogueAndWaitForConfirmation() { yield return(StartCoroutine(TownDialogueBox.RunDialogue(Dialogue, false))); Controller.Confirmation.SetActive(true); yield return(StartCoroutine(WaitForConfirmation())); string choiceMade = Controller.ConfirmationChoice; Controller.ConfirmationChoice = ""; if (choiceMade == "Yes") { DataManager.instance.LoadNextScene(NextScene); } else if (choiceMade == "No") { Controller.Confirmation.SetActive(false); Controller.TextBoxBackground.SetActive(false); } else { Debug.Log("Confirmation choice not Yes or No"); Controller.Confirmation.SetActive(false); Controller.TextBoxBackground.SetActive(false); } }
public void ActionsOnClick() { if (Controller.IsRunningDialogue == true) { return; } if (TalkedTo == false) { TalkedTo = true; SpeechBubbleImageTalkedTo(true); Controller.SaveTownState(); DataManager.instance.LoadNextScene(DialogueScene); } else { StartCoroutine(TownDialogueBox.RunDialogue(TalkedToDialogue)); } }