draw player last so ripples are always on bottom

This commit is contained in:
Brian Picciano 2021-03-12 18:08:30 -07:00
parent 481d14784d
commit 78a5df1684

View File

@ -283,11 +283,12 @@ function doTick() {
} }
} }
ctx.clearRect(0, 0, canvas.width, canvas.height);
player.draw()
drops.forEach(drop => drop.draw());
drops = drops.filter(drop => !drop.canGC()); drops = drops.filter(drop => !drop.canGC());
ctx.clearRect(0, 0, canvas.width, canvas.height);
drops.forEach(drop => drop.draw());
player.draw()
if (gameState == 'play') currTick++; if (gameState == 'play') currTick++;
requestAnimationFrame(doTick); requestAnimationFrame(doTick);
} }