/// <summary> /// Renders the entity by drawing the Texture to the entity's position. /// </summary> /// <param name="entity">The entity to render.</param> /// <param name="spriteBatch">The SpriteBatch used to draw with.</param> /// <param name="gameTime">The current GameTime.</param> public void Render(IRenderableEntity entity, SpriteBatch spriteBatch, GameTime gameTime) { foreach (var lItem in this.Items) { spriteBatch.Draw(lItem.Texture, entity.Position + lItem.Offset, lItem.TintColor); } }
/// <summary> /// Renders the entity by drawing the Texture to the entity's position. /// </summary> /// <param name="entity">The entity to render.</param> /// <param name="spriteBatch">The SpriteBatch used to draw with.</param> /// <param name="gameTime">The current GameTime.</param> public void Render(IRenderableEntity entity, SpriteBatch spriteBatch, GameTime gameTime) { spriteBatch.Draw(this.CurrentTexture, entity.Position, Color.White); this.CurrentTextureIndex++; if (this.CurrentTextureIndex == this.Textures.Count) { this.CurrentTextureIndex = 0; } }
/// <summary> /// Renders the entity by drawing the Texture to the entity's position. /// </summary> /// <param name="entity">The entity to render.</param> /// <param name="spriteBatch">The SpriteBatch used to draw with.</param> /// <param name="gameTime">The current GameTime.</param> public void Render(IRenderableEntity entity, SpriteBatch spriteBatch, GameTime gameTime) { spriteBatch.Draw(this.Texture, entity.Position, null, Color.White, 0, Vector2.Zero, this.Scale, SpriteEffects.None, 1); }