collisionGrid now updates on showing / hiding layers
This commit is contained in:
parent
31f3b2b48e
commit
b32a2970e4
6 changed files with 210 additions and 3 deletions
|
@ -560,7 +560,7 @@ export class GameScene extends DirtyScene {
|
|||
|
||||
this.pathfindingManager = new PathfindingManager(
|
||||
this,
|
||||
this.gameMap.getCollisionsGrid(),
|
||||
this.gameMap.getCollisionGrid(),
|
||||
this.gameMap.getTileDimensions()
|
||||
);
|
||||
|
||||
|
@ -576,7 +576,7 @@ export class GameScene extends DirtyScene {
|
|||
|
||||
this.pathfindingManager = new PathfindingManager(
|
||||
this,
|
||||
this.gameMap.getCollisionsGrid(),
|
||||
this.gameMap.getCollisionGrid(),
|
||||
this.gameMap.getTileDimensions()
|
||||
);
|
||||
|
||||
|
@ -1502,6 +1502,7 @@ ${escapedMessage}
|
|||
phaserLayers[i].setCollisionByProperty({ collides: true }, visible);
|
||||
}
|
||||
}
|
||||
this.pathfindingManager.setCollisionGrid(this.gameMap.getCollisionGrid());
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue