Пример #1
0
    void EndDialogue()
    {
        dialogueBox.SetActive(false);
        WitchMovement witchMovement = witch.GetComponent <WitchMovement>();

        if (npcName == "The Witch")
        {
            if (!witchMovement.IsMoving() && !witchMovement.IsAtTarget())
            {
                witchMovement.SetIsMoving(true);
            }
            witch.GetComponent <NPC>().dialogue.sentences = new string[] { "Oh my, you survived this long!", "There, now your curse is removed!" };
            if (witchMovement.IsAtTarget())
            {
                FindObjectOfType <LoadHandler>().LoadNextScene();
            }
        }
    }
Пример #2
0
    public void StartDialogue(Dialogue dialogue)
    {
        dialogueBox.SetActive(true);
        npcName       = dialogue.name;
        nameText.text = dialogue.name;

        sentences.Clear();

        foreach (string sentence in dialogue.sentences)
        {
            sentences.Enqueue(sentence);
        }

        DisplayNextSentence();

        if (npcName == "The Witch" && witchMovement.IsAtTarget())
        {
            FindObjectOfType <TimeController>().SetHazardsActive(false);
        }
    }