public override string Evaluate(TextWriterComponent textWriter, TextMeshProUGUI textMeshComponent, StringBuilder currentText, int currentIndex, string fullText) { string firstName = GetArgumentValue("firstname"); string lastName = GetArgumentValue("lastNAME"); return($"Hello {firstName} {lastName}!"); }
public override string Evaluate(TextWriterComponent textWriter, TextMeshProUGUI textMeshComponent, StringBuilder currentText, int currentIndex, string fullText) { // Appending the string instantly appends the text currentText.Append($"</color>"); // Returning a string would add it to the typed text return(""); }
/// <summary> /// Returns the current date as a string. /// <para>ARGUMENTS:</para> /// <para>format (OPTIONAL): the format string for the returned date.</para> /// </summary> /// <returns>a date string in the requested format (or the default format if non is specified)</returns> public override string Evaluate(TextWriterComponent textWriter, TextMeshProUGUI textMeshComponent, StringBuilder currentText, int currentIndex, string fullText) { if (ContainsArgument("format")) { return(DateTime.Now.ToString(GetArgumentValue("format"))); } return(DateTime.Now.ToString()); }
public override string Evaluate(TextWriterComponent textWriter, TextMeshProUGUI textMeshComponent, StringBuilder currentText, int currentIndex, string fullText) { textWriter.SetAvatar(avatarArg); return(string.Empty); }
/// <summary> /// Override this method to perform whatever action this command should be doing. The string that is /// returned will be added to the text mesh component /// </summary> /// <returns>String that will be conatenated by the magic type writer</returns> public abstract string Evaluate(TextWriterComponent textWriter, TextMeshProUGUI textMeshComponent, StringBuilder currentText, int currentIndex, string fullText);
public override string Evaluate(TextWriterComponent textWriter, TextMeshProUGUI textMeshComponent, StringBuilder currentText, int currentIndex, string fullText) { return("HELLO WORLD!"); }