// execute pre-title sequence IEnumerator sequence() { if (debug_skip_keycheck) { input_ready = false; //StopCoroutine (blink_caret); caret.SetActive(false); StartCoroutine(transitionToTitle()); } // Fade in float alpha = 1; while (alpha > 0) { screen_dimmer.color = new Color(0, 0, 0, alpha); alpha -= 0.05f; yield return(new WaitForEndOfFrame()); } yield return(new WaitForSeconds(0.5f)); text_scroll.startPrint("[set-talk-sfx=]Please type in the following phrase (hit ENTER to submit):", instruction_text); yield return(new WaitWhile(() => text_scroll.is_print)); yield return(new WaitForSeconds(0.5f)); prompt_text.text = target_input; input_ready = true; blink_caret = StartCoroutine(blinkCaret()); }
// displays next line of text; returns false if at end bool nextLine() { // check if dialogue is being printed if (!text_scroll.is_print) { if (curr_line >= scene.dialogue.Length) { return(false); } name_text.text = scene.whos_talking [curr_line]; // print name of speaker text_scroll.startPrint(scene.dialogue [curr_line], display_text); ++curr_line; } else // dump if dialogue already started { text_scroll.dump(); } return(true); }