Skip to content

Commit

Permalink
Swap pipe show/update so graphics don't lag by 1 frame
Browse files Browse the repository at this point in the history
  • Loading branch information
meiamsome committed Mar 13, 2018
1 parent 2eef994 commit c4a2302
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ function draw() {
}

for (var i = pipes.length - 1; i >= 0; i--) {
pipes[i].show();
pipes[i].update();
pipes[i].show();

if (pipes[i].pass(bird)) {
console.log("YAY");
Expand Down

0 comments on commit c4a2302

Please sign in to comment.