public void NextDialogue() { if (Dialogue.End()) { transition.ChangeScene(); } if (Dialogue.HasTrigger()) { if (Dialogue.GetTrigger() == "Change Image") { currentImage++; Display.sprite = Images[currentImage]; } if (Dialogue.GetTrigger() == "Hide Text") { Textbox.SetActive(false); } if (Dialogue.GetTrigger() == "Show Text") { Textbox.SetActive(true); } } Dialogue.Next(); DialogueText.text = Dialogue.GetCurrentDialogue(); }
private void Progress() { if (dialogue.End()) { InputManager.Instance.ChangeInput(InputType.Move); rootPanel.SetActive(false); } dialogue.Next(); }
public void Update() { if (!active) { return; } nextEnd = dialogues.End(); if (dialogues.GetChoices().Length != 0) { if (showingText) { ShowOther(); } if (Input.GetButtonDown("Choice 1")) { Debug.Log("Choice 1"); Choice(0); } else if (Input.GetButtonDown("Choice 2")) { Debug.Log("Choice 2"); Choice(1); } else if (Input.GetButtonDown("Choice 3")) { Debug.Log("Choice 3"); Choice(2); } } else { if (!showingText) { ShowOther(); } if (Input.GetButtonDown("Interact")) { if (!nextEnd) { dialogues.Next(); dialogueText.text = dialogues.GetCurrentDialogue(); } else { Hide(); } } } }
public void NextDialogue() { if (npc.End()) { DialogueBox.SetActive(false); npc = null; PlayerStatus pStatus = GetComponent <Player>().PlayerStatus; pStatus.CanWalk = true; pStatus.canInteract = true; pStatus.isTalking = false; return; } npc.Next(); text.text = npc.GetCurrentDialogue(); }
public void Progress() { npc.Next(); //This function returns the number of choices it has, in my case I'm checking that in the Display() function though. Display(); }