Fix a minor visual glitch in ArduBreakout

Submitted by @uXeBoy (Dan O'Shea).
The game screen was displayed very briefly after entering a high score,
before the title screen is displayed.
This commit is contained in:
Scott Allen 2020-07-20 17:32:04 -04:00
parent 32d23b7984
commit 2491e639aa
1 changed files with 9 additions and 2 deletions

View File

@ -111,9 +111,9 @@ void loop()
//Selects Font //Selects Font
//Draws the new level //Draws the new level
level = 1; level = 1;
initialDraw=true;
newLevel(); newLevel();
score = 0; score = 0;
initialDraw=true;
} }
if (lives>0) if (lives>0)
@ -432,7 +432,14 @@ void newLevel()
} }
} }
arduboy.display(); if (!initialDraw)
{
arduboy.clear();
}
else
{
arduboy.display();
}
} }
//Used to delay images while reading button input //Used to delay images while reading button input