From b12d762ffe73e8cc49ca3bbd8a13e68aaab08a2e Mon Sep 17 00:00:00 2001 From: gparant Date: Wed, 6 May 2020 02:12:37 +0200 Subject: [PATCH] Fix to add frame of player user --- front/src/Phaser/Player/Player.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/Phaser/Player/Player.ts b/front/src/Phaser/Player/Player.ts index 46a67ada..4dbda5bb 100644 --- a/front/src/Phaser/Player/Player.ts +++ b/front/src/Phaser/Player/Player.ts @@ -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}); } }