From b08a7074b84223fc92d3a24b7758cf222f3f97ef Mon Sep 17 00:00:00 2001 From: elioat Date: Tue, 24 Dec 2024 14:43:49 -0500 Subject: * --- html/rogue/js/rogue.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'html/rogue/js/rogue.js') 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'; -- cgit 1.4.1-2-gfad0