public void PushConversation() { // Checks if the current task is finished if (typingTask != null && typingTask.Running) { paragraph.text = currentSentence; typingTask.Stop(); return; } if (currentContents == null) { // Finish the conversation when the last sentence is met StopAllCoroutines(); EndConversation(); return; } // Push the next sentence currentSentence = currentContents.Sentence; speakingName.text = currentContents.Name; speakingFace.sprite = currentContents.Sprite; currentContents = currentContents.NextDialogue; StopAllCoroutines(); typingTask = new Task(TypeText(currentSentence)); }
private void StartConversation(SpeechSlide startingContents) { // Clear the previous conversation ClearBox(); // Assign the current dialogue contents to the manager currentContents = startingContents; isSpeaking = true; textBoxAnimation.SetBool(IsTalking, true); PushConversation(); }
public void SetStartingContents(SpeechSlide contents) { startingContents = contents; }
private void StartConvo(SpeechSlide slide) { hasSpoken = true; }
private void ClearBox() { currentContents = null; paragraph.text = ""; speakingName.text = ""; }