blob: 351632ffb69f39e3af2dcdb6087738f05764d855 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
'use strict';
import TileData from './TileData';
interface Input {
tiles: {[key: string]: TileData};
collision: string[];
layers: string[][][];
}
export default class MapData {
tiles: {[key: string]: TileData};
collision: string[];
layers: string[][][];
width: number;
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;
}
}
|