public PhraseState GetPhrase(uint id)
 {
     if (phrases.ContainsKey(id))
     {
         return((PhraseState)phrases[id]);
     }
     else
     {
         if (!npc.phrases.ContainsKey(id))
         {
             return(null);
         }
         PhraseState phrase = new PhraseState(npc.phrases[id]);;
         phrases.Add(id, phrase);
         return(phrase);
     }
 }
    private void GoToNextPhrase(uint phraseId)
    {
        if (phraseId == 0)
        {
            ReturnToLocation();
            return;
        }

        PhraseState phrase = currentNpc.GetPhrase(phraseId);

        if (phrase == null)
        {
            Debug.LogWarning("Current dialog phrase is null!");
            return;
        }
        Debug.Log("Goto Phrase: " + phrase.ToString());

        npcPhraseText.text = phrase.getText();

        List <AnswerState> answers = phrase.getAnswers();

        ClearContainer();
        for (int answInd = 0; answInd < answers.Count; answInd++)
        {
            AnswerState answer = answers [answInd];
            if ((answer.isActive) || (showHiddenAnswers))
            {
                AddAnswerToContainer(answer, answInd);
                Debug.Log("Answer: " + answer.ToString());
            }
            else
            {
                Debug.Log("Skip hidden answer: " + answer.ToString());
            }
        }
        ResizeContainer();
    }