center spawn position in the middle of a tile, instead of the upper left corner

This commit is contained in:
psy 2020-11-19 13:19:56 +01:00
parent 92137dc0a3
commit 9e835620f1

View File

@ -650,8 +650,8 @@ export class GameScene extends ResizableScene implements CenterListener {
for (const layer of this.mapFile.layers) {
if (layerName === layer.name && layer.type === 'tilelayer' && (layerName === "start" || this.isStartLayer(layer))) {
const startPosition = this.startUser(layer);
this.startX = startPosition.x;
this.startY = startPosition.y;
this.startX = startPosition.x + 16;
this.startY = startPosition.y + 16;
}
}
}