summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-04-12 22:22:33 -0600
committerLogan Hunt <loganhunt@simponic.xyz>2022-04-12 22:22:33 -0600
commit27fa6357a699771ade4ed5bf8c3fb32d7e73f4d4 (patch)
tree10e5eb62dc2bfcdf26ced2bfc45f7645408c5307 /index.html
parentcdb258991cc6ba8d4219038d9580e64d5e416803 (diff)
downloadbbiy-27fa6357a699771ade4ed5bf8c3fb32d7e73f4d4.tar.gz
bbiy-27fa6357a699771ade4ed5bf8c3fb32d7e73f4d4.zip
Add menuing system with level select and control changing
Diffstat (limited to 'index.html')
-rw-r--r--index.html15
1 files changed, 14 insertions, 1 deletions
diff --git a/index.html b/index.html
index ee6d5d5..f33ed44 100644
--- a/index.html
+++ b/index.html
@@ -21,11 +21,24 @@
<script>
const game = {
+ running: true,
+ lastTimeStamp: performance.now(),
+ controls: JSON.parse(
+ localStorage.getItem("controls") || JSON.stringify({
+ left: "ArrowLeft",
+ right: "ArrowRight",
+ up: "ArrowUp",
+ down: "ArrowDown",
+ undo: "z",
+ reset: "r",
+ })
+ ),
+ level: 0,
canvas: {
width: document.getElementById('game-canvas').width,
height: document.getElementById('game-canvas').height,
context: document.getElementById('game-canvas').getContext("2d"),
- }
+ },
};
</script>