Пример #1
0
 /// <summary>Called when player inputs next or AdvanceDialogue</summary>
 public void OnAdvanceDialogue()
 {
     if (isDialogueActive)
     {
         // Type next line if finished typing
         if (finishedTyping)
         {
             // If there are more lines, continue the dialogue
             if (dialogueLines != null && curLineIndex < dialogueLines.Length)
             {
                 // Type next line.
                 StartTyping();
             }
             else
             {
                 // End the dialogue.
                 EndDialogue();
             }
         }
         // End the typing early
         else
         {
             typeWriteRef.PreemptiveLineFinish();
             // Show the continue prompt
             contPrompt.SetActive(true);
         }
     }
 }