added backwards compatible check and maps

This commit is contained in:
jonny 2021-06-25 17:35:42 +02:00
parent 54d392be82
commit f536d538ea
5 changed files with 142 additions and 11 deletions

View file

@ -17,6 +17,8 @@ export class GameMap {
public exitUrls: Array<string> = []
public hasStartTile = false;
public constructor(private map: ITiledMap) {
this.layersIterator = new LayersIterator(map);
@ -27,6 +29,8 @@ export class GameMap {
tile.properties.forEach(prop => {
if (prop.name == "exitUrl" && typeof prop.value == "string") {
this.exitUrls.push(prop.value);
} else if (prop.name == "start") {
this.hasStartTile = true
}
})
}