diff options
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/MapData.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/model/MapData.ts b/src/model/MapData.ts index 54894c0..14f2586 100644 --- a/src/model/MapData.ts +++ b/src/model/MapData.ts @@ -9,12 +9,18 @@ interface Input { export default class MapData { tiles: {[key: string]: {file: string}}; - public collision: string[]; - public layers: string[][][]; + collision: string[]; + layers: string[][][]; + + width: number; + height: number; constructor(data: Input) { this.tiles = data.tiles; this.collision = data.collision; this.layers = data.layers; + + this.height = this.collision.length; + this.width = this.collision[0].length; } } |