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