So much stuff happened idek

This commit is contained in:
rain
2023-11-16 15:03:24 -06:00
parent 839d6c2c20
commit 1eef69f514
8 changed files with 126 additions and 62 deletions
+8 -8
View File
@@ -1,14 +1,14 @@
import data from './arcadia.js';
export class Map {
constructor(game, mapName) {
this.game = game;
this.map = mapName;
this.gravity = 1;
// x, y, w, h
this.platforms = [
{x: 150, y: 200, w: 100, h: 10},
{x: 100, y: 220, w: 100, h: 10},
{x: 0, y: game.height-10, w: game.width, h: 10}
]
this.map = data.data;
this.player = null;
this.ghost = null;
this.mapName = mapName;
this.platforms = this.map['platforms'];
this.enemies = this.map['enemies'];
this.gravity = this.map.gravity;
}
draw(ctx) {
for(var i = 0;i < this.platforms.length;i++) {