From 7576cea7e096be241ba1a715ad91d2faf90e72a9 Mon Sep 17 00:00:00 2001 From: Hanusiak Piotr Date: Mon, 17 Jan 2022 16:11:08 +0100 Subject: [PATCH] removed obsolete comments. Pass path as reference --- front/src/Phaser/UserInput/GameSceneUserInputHandler.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/front/src/Phaser/UserInput/GameSceneUserInputHandler.ts b/front/src/Phaser/UserInput/GameSceneUserInputHandler.ts index 02e256f0..b1d7cfd9 100644 --- a/front/src/Phaser/UserInput/GameSceneUserInputHandler.ts +++ b/front/src/Phaser/UserInput/GameSceneUserInputHandler.ts @@ -37,11 +37,9 @@ export class GameSceneUserInputHandler implements UserInputHandlerInterface { y: step.y * tileDimensions.height + tileDimensions.height * 0.5, }; }); - // Replace last position with pointerUp result - // pixelPath[pixelPath.length - 1] = { x: pointer.x + camera.scrollX, y: pointer.y + camera.scrollY }; // Remove first step as it is for the tile we are currently standing on pixelPath.shift(); - this.gameScene.CurrentPlayer.setPathToFollow([...pixelPath]); + this.gameScene.CurrentPlayer.setPathToFollow(pixelPath); }) .catch((reason) => { console.warn(reason);