private void Update() { // Ready to show next lines if (!awaiting_action && num_lines_written < num_lines) { WriteNextLines(); pause_arrow.enabled = false; writing = true; awaiting_action = true; } // All lines shown else if (!awaiting_action) { finished = true; } // Awaiting player input else if (!writing && Input.GetKeyDown(KeyCode.Z)) { awaiting_action = false; } // Allow speeding up of text printing if (writing && Input.GetKey(KeyCode.X)) { speed = Constants.TEXT_FAST_FORWARD_SPEED; } else { speed = Constants.TEXT_SPEEDS[(int)ui_manager.GetTextSpeed()]; } }