From 9770eaf432bacff9de1b9911adef1db368b8cc70 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 24 Oct 2018 01:26:15 +0200 Subject: Throw in tslint and fix style --- src/model/MapData.ts | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'src/model/MapData.ts') 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; - collision: string[]; - layers: string[][][]; + public tiles: Map; + 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; + } } -- cgit v1.2.3