mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:47:36 +00:00
FlappyBug: Add an input cooldown after game over
This makes sure the player doesn't accidentally start a new game after they bump into an obstacle.
This commit is contained in:
parent
018344bb07
commit
f50003bdd2
2 changed files with 26 additions and 3 deletions
|
@ -34,6 +34,7 @@ private:
|
|||
void tick();
|
||||
void reset();
|
||||
void game_over();
|
||||
bool ready_to_start() const;
|
||||
|
||||
struct Bug {
|
||||
const float x { 50 };
|
||||
|
@ -99,6 +100,7 @@ private:
|
|||
Optional<float> m_highscore;
|
||||
float m_last_score;
|
||||
float m_difficulty;
|
||||
float m_restart_cooldown;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue