public void RenderEverything(TextMesh TextMesh, ProceduralTextParametersV2 ProceduralTextParametersV2 = null) { while (currentDisplayedTextUnModified.Length != targetText.Length) { this.Increment(TextMesh, ProceduralTextParametersV2); } }
public void GUITick(TextMesh TextMesh, ProceduralTextParametersV2 ProceduralTextParametersV2) { if (ProceduralTextParametersV2 != null) { ProceduralTextParametersV2.GUITick(TextMesh); } }
public ProceduralText(string initialRawText, GeneratedTextDimensionsComponent GeneratedTextDimensionsComponent, Text textAreaText, ProceduralTextParametersV2 ProceduralTextParametersV2 = null) { this.initialRawText = initialRawText; this.transformedInitialRawText = Regex.Unescape(this.initialRawText); this.ProceduralTextParametersV2 = ProceduralTextParametersV2; #region Special Character Image mapping if (this.ProceduralTextParametersV2 != null) { this.transformedInitialRawText = this.ProceduralTextParametersV2.ParseParameters(this.transformedInitialRawText); } #endregion this.textDimensions = new GeneratedTextDimensions(GeneratedTextDimensionsComponent); this.TextPlayerEngine = new TextPlayerEngine(GeneratedTextDimensionsComponent, this.textDimensions); this.TextMesh = new TextMesh(textAreaText); }
public void Increment(TextMesh TextMesh, ProceduralTextParametersV2 ProceduralTextParametersV2 = null) { if (currentDisplayedTextUnModified.Length < targetText.Length) { var stringToAdd = targetText[currentDisplayedTextUnModified.Length].ToString(); for (var i = 0; i < stringToAdd.Length; i++) { if (stringToAdd[i] != ' ' && stringToAdd[i] != '\n') { TextMesh.IncrementChar(stringToAdd[i]); if (ProceduralTextParametersV2 != null) { ProceduralTextParametersV2.OnIncrement(TextMesh, stringToAdd[i], this.VisibleQuadTotalCounter); } this.VisibleQuadTotalCounter += 1; } currentDisplayedTextUnModified += stringToAdd[i]; } } }