From 1f9cd7a110e4fe1cf3b4eb220a083fa0f9b0cf98 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 31 Oct 2018 21:55:41 +0100 Subject: Switch from characters to numerical tile IDs --- src/model/data/MapData.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/model/data') diff --git a/src/model/data/MapData.ts b/src/model/data/MapData.ts index 0f14f50..0c44d94 100644 --- a/src/model/data/MapData.ts +++ b/src/model/data/MapData.ts @@ -1,21 +1,21 @@ import {mapFromObject} from '../../util'; interface Input { - readonly tiles: {[key: string]: string}; - readonly collision: string[]; - readonly layers: string[][][]; + readonly tiles: string[]; + readonly collision: boolean[][]; + readonly layers: number[][][]; } export default class MapData { - public readonly tiles: Map; - public readonly collision: string[]; - public readonly layers: string[][][]; + public readonly tiles: string[]; + public readonly collision: boolean[][]; + public readonly layers: number[][][]; public readonly width: number; public readonly height: number; constructor(data: Input) { - this.tiles = mapFromObject(data.tiles); + this.tiles = data.tiles; this.collision = data.collision; this.layers = data.layers; -- cgit v1.2.3