diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2018-11-01 00:59:13 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2018-11-01 00:59:13 +0100 |
commit | 9f2e4e6996fb96d23e1ca29667130a2111a59de5 (patch) | |
tree | fa7c3c22d469f062252735269dbc09031fc47dd8 /src/model/data/map.ts | |
parent | 22b06efe2c2646a01535b5bbf5f3cc57de81ad0d (diff) | |
download | rpgedit-9f2e4e6996fb96d23e1ca29667130a2111a59de5.tar rpgedit-9f2e4e6996fb96d23e1ca29667130a2111a59de5.zip |
Do not use default exports
Diffstat (limited to 'src/model/data/map.ts')
-rw-r--r-- | src/model/data/map.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/model/data/map.ts b/src/model/data/map.ts new file mode 100644 index 0000000..50b9175 --- /dev/null +++ b/src/model/data/map.ts @@ -0,0 +1,23 @@ +export interface Input { + readonly tiles: string[]; + readonly collision: boolean[][]; + readonly layers: number[][][]; +} + +export class MapData { + 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 = data.tiles; + this.collision = data.collision; + this.layers = data.layers; + + this.height = this.collision.length; + this.width = this.collision[0].length; + } +} |