for (int i = -5; i < 5; i++)
{
Rectangle screenRectangle = new Rectangle(0, 0, screenWidth, screenHeight);
spriteBatch.Draw(foregroundTexture, screenRectangle, Color.White);
Rectangle backGroundRectangle = new Rectangle(x + screenWidth * i, 0, screenWidth, screenHeight);
spriteBatch.Draw(backgroundTexture, backGroundRectangle, Color.White);
spriteBatch.DrawString(font, "Variable i: " + i, new Vector2(0, 0), Color.Brown);
}
I want to show on the screen when I'm running the game the counting of i
like: -5 , -4 , -3...but not in a line, just like a timer. -5 then overwrite it and show -4 overwrite it and show -3 and so on...like seconds of a clock.
The problem is I'm getting a strange painting near the numbers like its repeating and painting something there all the time.
GraphicsDevice.Clear()
anywhere? \$\endgroup\$