removed obsolete comments. Pass path as reference

This commit is contained in:
Hanusiak Piotr 2022-01-17 16:11:08 +01:00
parent 3e81278e72
commit 7576cea7e0

View file

@ -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);