async call for recalculating tiles costs (#1890)
* async call for recalculating tiles costs * fixed setWalkingCostGrid still being a blocking process * set exits tiles cost from the start * removed typing error from code Co-authored-by: Hanusiak Piotr <piotr@ltmp.co>
This commit is contained in:
@@ -571,7 +571,6 @@ export class GameScene extends DirtyScene {
|
||||
this.pathfindingManager = new PathfindingManager(
|
||||
this,
|
||||
this.gameMap.getCollisionGrid(),
|
||||
this.gameMap.getWalkingCostGrid(),
|
||||
this.gameMap.getTileDimensions()
|
||||
);
|
||||
|
||||
@@ -1450,7 +1449,7 @@ ${escapedMessage}
|
||||
phaserLayers[i].setCollisionByProperty({ collides: true }, visible);
|
||||
}
|
||||
}
|
||||
this.pathfindingManager.setCollisionGrid(this.gameMap.getCollisionGrid(), this.gameMap.getWalkingCostGrid());
|
||||
this.pathfindingManager.setCollisionGrid(this.gameMap.getCollisionGrid());
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user