Throw in tslint and fix style
This commit is contained in:
parent
06b2c5bec7
commit
9770eaf432
9 changed files with 303 additions and 170 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue