From e85c6972a724d8c66f0d48e6b2fb0ffdcef8e6fc Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 7 Jul 2024 03:08:20 -0500 Subject: fix resource reset bug --- level.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'level.js') diff --git a/level.js b/level.js index 78af6d0..0d62adc 100644 --- a/level.js +++ b/level.js @@ -60,6 +60,7 @@ export function setupLevelUi(level, root, sfx) { } catch(err) { } level.running = false; level.path = computePath(level.equations); + level.resources.forEach(x => x.collected = false); render(ui.ctx, level, 0); }; ui.xeq.onkeydown = ui.xeq.onchange; @@ -77,6 +78,7 @@ export function setupLevelUi(level, root, sfx) { } catch(err) { } level.running = false; level.path = computePath(level.equations); + level.resources.forEach(x => x.collected = false); render(ui.ctx, level, 0); }; ui.yeq.onkeydown = ui.yeq.onchange; -- cgit v1.2.1