newLevel() displaying / clearing

newLevel() displays blocks on the screen for a moment after entering high score initials, before displaying the title screen (annoyed me enough to want to create a PR for it).
This commit is contained in:
Dan O'Shea 2018-07-01 10:06:32 +09:30 committed by GitHub
parent 0eae58c760
commit e0ff80a803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -92,9 +92,9 @@ void loop()
//Selects Font
//Draws the new level
level = 1;
initialDraw=true;
newLevel();
score = 0;
initialDraw=true;
}
if (lives>0)
@ -383,7 +383,8 @@ void Score()
score += (level*10);
}
void newLevel(){
void newLevel()
{
//Undraw paddle
arduboy.drawRect(xPaddle, 63, 11, 1, 0);
@ -408,7 +409,8 @@ void newLevel(){
}
}
arduboy.display();
if (!initialDraw) arduboy.clear();
else arduboy.display();
}
//Used to delay images while reading button input
@ -713,4 +715,3 @@ void playToneTimed(unsigned int frequency, unsigned int duration)
arduboy.delayShort(duration);
beep.noTone();
}