public static void Draw(SpriteBatch spriteBatch) { animation.Draw(spriteBatch, position); float x = position.X + 80; float y = position.Y + 20; FontHelper.DrawWithOutline(spriteBatch, fontBig, score.ToString(), new Vector2(x, y), 1, Color.White, Color.Black); }
public static void Draw(SpriteBatch spriteBatch) { animation.Draw(spriteBatch, position); float x = position.X + 80; float y = position.Y + 15; FontHelper.DrawWithOutline(spriteBatch, fontBig, health.ToString(), new Vector2(x, y), 1, Color.White, Color.Black); float widthHealth = fontBig.MeasureString(health.ToString()).X; FontHelper.DrawWithOutline(spriteBatch, fontSmall, "/" + maxHealth.ToString(), new Vector2(x + widthHealth + 5, y + 20), 1, Color.White, Color.Black); }