Fix to add frame of player user
This commit is contained in:
parent
4e04357b71
commit
b12d762ffe
@ -83,12 +83,12 @@ export class Player extends PlayableCaracter implements CurrentGamerInterface, G
|
||||
}
|
||||
if (x !== 0 || y !== 0) {
|
||||
this.move(x, y);
|
||||
this.emit(hasMovedEventName, {direction, x: this.x, y: this.y});
|
||||
this.emit(hasMovedEventName, {direction, x: this.x, y: this.y, frame: this.PlayerTexture});
|
||||
} else {
|
||||
if (this.previousMove !== PlayerAnimationNames.None) {
|
||||
direction = PlayerAnimationNames.None;
|
||||
this.stop();
|
||||
this.emit(hasMovedEventName, {direction, x: this.x, y: this.y});
|
||||
this.emit(hasMovedEventName, {direction, x: this.x, y: this.y, frame: this.PlayerTexture});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user