public override IEnumerator SequenceLoop() { // Waits until the text box is fully displayed while (!VariableManager.Instance.GetBoolVariableValue(VariableConstants.TEXT_BOX_IS_ACTIVE)) { yield return(null); } // Begin text print animation running = true; printAnimation = manager.BeginTextAnimation(text); while (running) { // If the player attempts to advance if (Input.GetMouseButtonDown(0)) // Replace this with touch when we build to platform { // Stop printing and fully display text if the animation is still going if (manager.isPrinting) { manager.EndTextAnimation(printAnimation, text); } // Otherwise end sequence else { running = false; } } yield return(null); } SequenceEnd(); }