21 lines
378 B
JavaScript
21 lines
378 B
JavaScript
|
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;
|
||
|
}
|
||
|
|
||
|
}
|