avocado-old/packages/topdown/layer.js

21 lines
378 B
JavaScript
Raw Normal View History

2019-03-25 23:39:44 -05:00
import {Tiles} from '@avocado/topdown';
export class Layer {
constructor() {
this.tiles = undefined;
this.tilesetUri = undefined;
this.entityList = undefined;
}
fromJSON(json) {
if (json.tiles) {
this.tiles = (new Tiles()).fromJSON(json.tiles)
}
if (json.tilesetUri) {
this.tilesetUri = json.tilesetUri;
}
return this;
}
}