public void DisplayNextSentence()
    {
        if (sentences.Count == 0)
        {
            EndDialogue();
            return;
        }

        DialogueAndCheckIfPlayer sentence = sentences.Dequeue();

        if (sentence.IsPlayer == true)
        {
            if (sentence.sentence.Contains("QUEST_START_"))
            {
                string QuestID       = sentence.sentence.Replace("QUEST_START_", "");
                int    ActualQuestID = 0;
                if (Int32.TryParse(QuestID, out ActualQuestID))
                {
                    playerScript.StartQuest(ActualQuestID);
                    EndDialogue();
                    return;
                }
            }
            else if (sentence.sentence.Contains("QUEST_ADVANCE_"))
            {
                string QuestID       = sentence.sentence.Replace("QUEST_ADVANCE_", "");
                int    ActualQuestID = 0;
                if (Int32.TryParse(QuestID, out ActualQuestID))
                {
                    playerScript.AdvanceQuest(ActualQuestID);
                    EndDialogue();
                    return;
                }
            }
            else if (sentence.sentence.Contains("QUEST_COMPLETE_"))
            {
                string QuestID       = sentence.sentence.Replace("QUEST_COMPLETE_", "");
                int    ActualQuestID = 0;
                if (Int32.TryParse(QuestID, out ActualQuestID))
                {
                    playerScript.CompleteQuest(ActualQuestID);
                    EndDialogue();
                    return;
                }
            }
            else if (sentence.sentence.Contains("DIALOGUE_CHOICES_"))
            {
                string Choice1;
                string Choice2;
                string ChoiceName = sentence.sentence.Replace("DIALOGUE_CHOICES_", "");
                string FirstChoiceNumber;
                string SecondChoiceNumber;
                DialogueAndCheckIfPlayer Choice1Sentence = sentences.Dequeue();
                Choice1 = Choice1Sentence.sentence;
                DialogueAndCheckIfPlayer Choice2Sentence = sentences.Dequeue();
                Choice2 = Choice2Sentence.sentence;
                DialogueAndCheckIfPlayer Choice3Sentence = sentences.Dequeue();
                FirstChoiceNumber = Choice3Sentence.sentence;
                DialogueAndCheckIfPlayer Choice4Sentence = sentences.Dequeue();
                SecondChoiceNumber = Choice4Sentence.sentence;

                //Set button onClick function.
                DialogueChoicesUI.transform.GetChild(2).gameObject.GetComponent <Button>().onClick.AddListener(delegate { StaticClasses.WhoAreYouInDialogueWithGO.GetComponent <DialogueTrigger>().TriggerDialogueChoices(ChoiceName + "Choice" + FirstChoiceNumber); });
                DialogueChoicesUI.transform.GetChild(3).gameObject.GetComponent <Button>().onClick.AddListener(delegate { StaticClasses.WhoAreYouInDialogueWithGO.GetComponent <DialogueTrigger>().TriggerDialogueChoices(ChoiceName + "Choice" + SecondChoiceNumber); });

                //Set actives and texts for choices.
                DialogueChoicesUI.SetActive(true);
                DialogueUI.SetActive(false);
                DialogueChoicesUI.transform.GetChild(4).gameObject.GetComponent <Text>().text = Choice1;
                DialogueChoicesUI.transform.GetChild(5).gameObject.GetComponent <Text>().text = Choice2;
            }
            else
            {
                DialogueImage.sprite = playerSprite;
            }
        }
        else
        {
            if (sentence.sprite)
            {
                DialogueImage.sprite = sentence.sprite;
            }
            else
            {
                DialogueImage.sprite = null;
            }
        }
        StopAllCoroutines();
        StartCoroutine(TypeSentence(sentence));
    }