Example #1
0
        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));
        }
Example #2
0
        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();
        }
Example #3
0
 public void SetStartingContents(SpeechSlide contents)
 {
     startingContents = contents;
 }
Example #4
0
 private void StartConvo(SpeechSlide slide)
 {
     hasSpoken = true;
 }
Example #5
0
 private void ClearBox()
 {
     currentContents   = null;
     paragraph.text    = "";
     speakingName.text = "";
 }