X-Git-Url: http://git.megabrutal.com/?p=ld38.git;a=blobdiff_plain;f=ld38.js;fp=ld38.js;h=6e882beea09d7aed86d2556f0567443c6f07a917;hp=c5c6755e04ba76349c870c13c9dee6898e37ad6f;hb=9bc05df28e7738352d7e73d03e545cc46282814d;hpb=4a2df5698edfda465acb721ecee7b88477437de4 diff --git a/ld38.js b/ld38.js index c5c6755..6e882be 100644 --- a/ld38.js +++ b/ld38.js @@ -179,6 +179,7 @@ newWorldStartY += (newWorldEndY - newWorldStartY) / 2; // Draw a wall around the new world bounds. + walls.removeAll(true); walls.add(game.add.tileSprite(newWorldStartX - WALL_THICKNESS, newWorldStartY - WALL_THICKNESS, newWorldEndX - newWorldStartX + WALL_THICKNESS * 2, WALL_THICKNESS, 'wall')); walls.add(game.add.tileSprite(newWorldStartX - WALL_THICKNESS, newWorldEndY, newWorldEndX - newWorldStartX + WALL_THICKNESS * 2, WALL_THICKNESS, 'wall')); walls.add(game.add.tileSprite(newWorldStartX - WALL_THICKNESS, newWorldStartY - WALL_THICKNESS, WALL_THICKNESS, newWorldEndY - newWorldStartY + WALL_THICKNESS * 2, 'wall'));