I was trying to get a score in my game. But it looks like the loader cant find the font Arial. When I try to run the game I get the error: "Error loading "Arial". File not found"
Game1.cs:
HUD hud;
protected override void LoadContent()
{
hud = new HUD();
hud.Font = Content.Load<SpriteFont>("Arial"); // error here
}
HUD.cs:
public class HUD
{
private Vector2 scorePos = new Vector2(20, 10);
public SpriteFont Font { get; set; }
public int Score { get; set; }
public HUD()
{
}
public void Draw(SpriteBatch spriteBatch)
{
spriteBatch.DrawString(
Font,
"Score: " + Score.ToString(),
scorePos,
Color.White);
}
}