Main menu and save function to json file implemented.

This commit is contained in:
Mal
2020-02-02 23:00:14 +01:00
parent 9c3aca1bc9
commit d893483da9
11 changed files with 252 additions and 7 deletions

View File

@@ -26,7 +26,7 @@ class ImageLoader
{
image.addEventListener(
'load', () => {
this.update();1
this.update();
}
);
@@ -133,7 +133,8 @@ const FRAME_DURATION = 1000 / FPS;
const GAME_SPEED = 1;
const GRAVITY = 2;
let levelJson = new FileLoader('levels/level.json');
let levelJson = new FileLoader('levels/test_stairs.json');
console.log(levelJson.getContent());
const LEVEL = levelJson.getContent();
let lastRendered = undefined;