diff --git a/public/js/main.js b/public/js/main.js index 35dd9b50..2327a592 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -9,9 +9,7 @@ const context = canvas.getContext('2d'); function createSpriteLayer(sprite, pos) { return function drawSpriteLayer(context) { - for (let i = 0; i < 20; ++i) { - sprite.draw('idle', context, pos.x + i * 16, pos.y); - } + sprite.draw('idle', context, pos.x, pos.y); }; } @@ -28,8 +26,8 @@ Promise.all([ comp.layers.push(createBackgroundLayer(level.backgrounds, backgroundSprites)); const pos = { - x: 0, - y: 0, + x: 64, + y: 64, }; comp.layers.push(createSpriteLayer(marioSprite, pos));