We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46e7744 commit 7b64c9eCopy full SHA for 7b64c9e
2 files changed
2-flappy_bird/flappy_bird.zip
3 Bytes
2-flappy_bird/flappy_bird/main.js
@@ -73,14 +73,14 @@ game_state.main.prototype = {
73
// Get the first dead pipe of our group
74
var pipe = this.pipes.getFirstDead();
75
76
- // Kill the pipe when it's no longer visible
77
- pipe.outOfBoundsKill = true;
78
-
79
// Set the new position of the pipe
80
pipe.reset(x, y);
81
82
- // Add velocity to the pipe to make it move left
+ // Add velocity to the pipe to make it move left
83
pipe.body.velocity.x = -200;
+
+ // Kill the pipe when it's no longer visible
+ pipe.outOfBoundsKill = true;
84
},
85
86
// Add a row of 6 pipes with a hole somewhere in the middle
0 commit comments