manually resolve promise on certain events for player path following

This commit is contained in:
Hanusiak Piotr 2022-01-19 13:09:17 +01:00
parent f78392ceab
commit 9b94705177
3 changed files with 16 additions and 17 deletions

View file

@ -35,7 +35,9 @@ export class GameSceneUserInputHandler implements UserInputHandlerInterface {
.then((path) => {
// Remove first step as it is for the tile we are currently standing on
path.shift();
this.gameScene.CurrentPlayer.setPathToFollow(path);
this.gameScene.CurrentPlayer.setPathToFollow(path).catch((reason) => {
console.warn(reason);
});
})
.catch((reason) => {
console.warn(reason);