summaryrefslogtreecommitdiff
path: root/level.js
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2024-07-07 03:08:20 -0500
committersanine <sanine.not@pm.me>2024-07-07 03:08:20 -0500
commite85c6972a724d8c66f0d48e6b2fb0ffdcef8e6fc (patch)
treea44bb59497b4f534604781c623a613df07d1106a /level.js
parent1de995864fdda525d7fb95a1313f847cacb47056 (diff)
fix resource reset bug
Diffstat (limited to 'level.js')
-rw-r--r--level.js2
1 files changed, 2 insertions, 0 deletions
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;