/// <summary> /// Starts dialogue queue. /// </summary> /// <param name="dialogue"></param> public void StartDialogue(Dialogue dialogue) { Debug.Log("Starting dialogue for NPC: " + dialogue.name); // Update sprite. NpcImage.sprite = SpriteCache.GetSprite(dialogue.sprite); // Clear out the current queue. Sentences.Clear(); // Enqueue the sentences from the given dialogue. foreach (string sentence in dialogue.sentences) { Sentences.Enqueue(sentence); } StartSentenceHelper(dialogue); }