public void addResponse(int dialogueIndex, int answerIndex) { Dialogue.Sentence response = new Dialogue.Sentence(); CharacterData.Info.Character name = dialogueList[dialogueIndex].character.name; response.text = "Response"; response.sprite = characterData.GetCharacterSprites(name)[0]; dialogueList[dialogueIndex].answerChoiceList[answerIndex].responseList.Add(response); }
public void DisplayNextSentence() { if (m_Sentences.Count == 0) { EndDialogue(); return; } StopAllCoroutines(); Dialogue.Sentence sentence = m_Sentences.Dequeue(); string speakerName = sentence.m_Name; if (m_NameText.text != speakerName) { m_NameText.text = speakerName; m_Thumbnail.sprite = RessourceManager.LoadSprite(speakerName, 0); } StartCoroutine(TypeSentence(sentence.m_Sentence)); }