center spawn position in the middle of a tile, instead of the upper left corner
This commit is contained in:
parent
92137dc0a3
commit
9e835620f1
@ -650,8 +650,8 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||||||
for (const layer of this.mapFile.layers) {
|
for (const layer of this.mapFile.layers) {
|
||||||
if (layerName === layer.name && layer.type === 'tilelayer' && (layerName === "start" || this.isStartLayer(layer))) {
|
if (layerName === layer.name && layer.type === 'tilelayer' && (layerName === "start" || this.isStartLayer(layer))) {
|
||||||
const startPosition = this.startUser(layer);
|
const startPosition = this.startUser(layer);
|
||||||
this.startX = startPosition.x;
|
this.startX = startPosition.x + 16;
|
||||||
this.startY = startPosition.y;
|
this.startY = startPosition.y + 16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user