/// <summary> /// Adds a text effect to the screen with the given message, position, and color. /// </summary> /// <param name="fontName">Which font name to use. You must have a corresponding spritefont in your content project.</param> /// <param name="message">The message to display.</param> /// <param name="position">Where to display the message.</param> /// <param name="fontColor">The color to use when drawing the font.</param> /// <returns></returns> public TextEffect AddTextEffect(string fontName, string message, Vector2 position, Color fontColor) { TextEffect textEffect = new TextEffect(this, fontName, message); textEffect.Position = position; textEffect.FontColor = fontColor; Components.Add(textEffect); return textEffect; }
/// <summary> /// Adds a TextEffect to the screen with the given message. /// Make sure to set the position and seconds to live for text effects /// </summary> /// <param name="fontName">Which font name to use. You must have a corresponding spritefont in your content project.</param> /// <param name="message">The message to display.</param> /// <returns>A PlayerDisplayData object with the default configuration.</returns> public TextEffect AddTextEffect(string fontName, string message) { TextEffect textEffect = new TextEffect(this, fontName, message); Components.Add(textEffect); return textEffect; }