mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
FlappyBug: Start obstacles off the screen
Previously obstacles were respawning fully on-screen which caused a discontinuous look. Now they smoothly move into view from off-screen.
This commit is contained in:
parent
444fcfd0d2
commit
3f603ab082
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ private:
|
||||||
|
|
||||||
void reset()
|
void reset()
|
||||||
{
|
{
|
||||||
x = game_width;
|
x = game_width + width;
|
||||||
gap_top_y = get_random_uniform(game_height - gap_height);
|
gap_top_y = get_random_uniform(game_height - gap_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue