Stop before running into followed Avatar; stop sprite animation
This commit is contained in:
@@ -41,7 +41,7 @@ export class PlayerMovement {
|
||||
oldX: this.startPosition.x,
|
||||
oldY: this.startPosition.y,
|
||||
direction: this.endPosition.direction,
|
||||
moving: true,
|
||||
moving: this.endPosition.moving,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ export class Player extends Character {
|
||||
|
||||
const distance = Math.pow(xDist, 2) + Math.pow(yDist, 2);
|
||||
|
||||
if (distance < 650) {
|
||||
if (distance < 2000) {
|
||||
this.stop();
|
||||
} else {
|
||||
const moveAmount = 9 * 20;
|
||||
|
||||
Reference in New Issue
Block a user