From c4a2302432e4fcfe3e7e6000bddcb4f035fe8ec1 Mon Sep 17 00:00:00 2001 From: Oliver Wright Date: Tue, 13 Mar 2018 20:35:56 +0000 Subject: [PATCH] Swap pipe show/update so graphics don't lag by 1 frame --- sketch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sketch.js b/sketch.js index ae4ddff..38b49a3 100644 --- a/sketch.js +++ b/sketch.js @@ -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");