Esempio n. 1
0
    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();
    }
Esempio n. 2
0
    private void Progress()
    {
        if (dialogue.End())
        {
            InputManager.Instance.ChangeInput(InputType.Move);
            rootPanel.SetActive(false);
        }

        dialogue.Next();
    }
Esempio n. 3
0
 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();
             }
         }
     }
 }
Esempio n. 4
0
    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();
    }
Esempio n. 5
0
 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();
 }