diff options
Diffstat (limited to 'html/rogue/js/rogue.js')
-rw-r--r-- | html/rogue/js/rogue.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/html/rogue/js/rogue.js b/html/rogue/js/rogue.js index 8276d8d..f441bbd 100644 --- a/html/rogue/js/rogue.js +++ b/html/rogue/js/rogue.js @@ -72,6 +72,10 @@ const render = (ctx, state) => { state.world.backgroundRocks.forEach(rock => { renderRock(ctx, rock, ctx.canvas.height - state.world.groundHeight); }); + + state.world.backgroundGrass.forEach(grass => { + renderGrass(ctx, grass, ctx.canvas.height - state.world.groundHeight, state.time); + }); // 2. Render platforms state.world.platforms.forEach(platform => { @@ -91,6 +95,10 @@ const render = (ctx, state) => { renderRock(ctx, rock, ctx.canvas.height - state.world.groundHeight); }); + state.world.foregroundGrass.forEach(grass => { + renderGrass(ctx, grass, ctx.canvas.height - state.world.groundHeight, state.time); + }); + // 5. Render ground const groundY = ctx.canvas.height - state.world.groundHeight; ctx.fillStyle = '#4a4'; |