manually resolve promise on certain events for player path following
This commit is contained in:
parent
f78392ceab
commit
9b94705177
3 changed files with 16 additions and 17 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue