summaryrefslogtreecommitdiffstats
path: root/src/model/MapData.ts
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2018-10-24 01:26:15 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2018-10-24 22:28:27 +0200
commit9770eaf432bacff9de1b9911adef1db368b8cc70 (patch)
treec75db564154f70c995efbb534063c8b9969ac55c /src/model/MapData.ts
parent06b2c5bec7e246bad345fecdb12752866452e5e7 (diff)
downloadrpgedit-9770eaf432bacff9de1b9911adef1db368b8cc70.tar
rpgedit-9770eaf432bacff9de1b9911adef1db368b8cc70.zip
Throw in tslint and fix style
Diffstat (limited to 'src/model/MapData.ts')
-rw-r--r--src/model/MapData.ts31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/model/MapData.ts b/src/model/MapData.ts
index b83e146..dcb98b8 100644
--- a/src/model/MapData.ts
+++ b/src/model/MapData.ts
@@ -1,26 +1,25 @@
import {mapFromObject} from '../util';
-
interface Input {
- tiles: {[key: string]: string};
- collision: string[];
- layers: string[][][];
+ tiles: {[key: string]: string};
+ collision: string[];
+ layers: string[][][];
}
export default class MapData {
- tiles: Map<string, string>;
- collision: string[];
- layers: string[][][];
+ public tiles: Map<string, string>;
+ public collision: string[];
+ public layers: string[][][];
- width: number;
- height: number;
+ public width: number;
+ public height: number;
- constructor(data: Input) {
- this.tiles = mapFromObject(data.tiles);
- this.collision = data.collision;
- this.layers = data.layers;
+ constructor(data: Input) {
+ this.tiles = mapFromObject(data.tiles);
+ this.collision = data.collision;
+ this.layers = data.layers;
- this.height = this.collision.length;
- this.width = this.collision[0].length;
- }
+ this.height = this.collision.length;
+ this.width = this.collision[0].length;
+ }
}