/// <summary> /// Creates a basic container with no initial effects. /// </summary> /// <param name="fontAsset">The name of the SpriteFont file used to load the font.</param> public TextContainer(string fontAsset) { asset = fontAsset; text = new List <TextType>(); effects = new StoryboardType(); }
public GraphicsContainer(string graphicAsset) { asset = graphicAsset; graphics = new List <GraphicType>(); effects = new StoryboardType(); }
public GraphicType(string textureAsset, Vector2 location, bool draw) { asset = textureAsset; position = location; drawGraphic = draw; effects = new StoryboardType(); color = Color.White; origin = new Vector2(); scale = 1f; rotation = 0f; }
public GraphicType(Texture2D texture, Vector2 location, Color tint, StoryboardType newEffects) { graphic = texture; position = location; color = tint; effects = newEffects; drawGraphic = true; origin = new Vector2(); scale = 1f; rotation = 0f; }
public GraphicsContainer(GraphicsDevice graphicsDevice, int textureWidth, int textureHeight, Color textureColor, IEffect effect) { effects = new StoryboardType(); effects.addEffect(effect); color = textureColor; array = new Color[textureWidth * textureHeight]; graphic = new Texture2D(graphicsDevice, textureWidth, textureHeight); graphics = new List <GraphicType>(); }
/// <summary> /// Creates a text-based object to display as part of the HUD. /// </summary> /// <param name="fontAsset">The name of the SpriteFont file to load the font from.</param> /// <param name="displayText">The text to display.</param> /// <param name="textVector">The position within the HUD to display from.</param> /// <param name="textColor">The text's color.</param> /// <param name="isVisibleConstantly">Allows the object to be visible even when the effects are not running. Otherwise, /// the object will only be visible when the effects are running.</param> public TextType(string fontAsset, string displayText, Vector2 textVector, Color textColor, bool isVisibleConstantly) { asset = fontAsset; text = displayText; vector = textVector; color = textColor; effects = new StoryboardType(); drawText = isVisibleConstantly; rotation = 0; scale = 1; origin = new Vector2(); }
public GraphicType(GraphicsDevice graphics, int textureWidth, int textureHeight, Vector2 location, Color textureColor, bool draw) { width = textureWidth; height = textureHeight; position = location; color = textureColor; drawGraphic = draw; graphic = new Texture2D(graphics, width, height); effects = new StoryboardType(); origin = new Vector2(); scale = 1f; rotation = 0f; }
/// <summary> /// Creates a text-based object to display as part of the HUD. /// </summary> /// <param name="font">The SpriteFont to draw the text with.</param> /// <param name="displayText">The text to display.</param> /// <param name="textVector">The position within the HUD to display from.</param> /// <param name="textColor">The text's color.</param> /// <param name="timeline">The storyboard of effects to run.</param> public TextType(SpriteFont textFont, string displayText, Vector2 textVector, Color textColor, StoryboardType timeline) : this("", displayText, textVector, textColor, true) { effects = timeline; font = textFont; }