diff --git a/front/src/Phaser/Player/Animation.ts b/front/src/Phaser/Player/Animation.ts index 46c05154..1c555ad9 100644 --- a/front/src/Phaser/Player/Animation.ts +++ b/front/src/Phaser/Player/Animation.ts @@ -50,9 +50,10 @@ export const getPlayerAnimations = (name: string = Textures.Player): AnimationDa }; export const playAnimation = (Player : Phaser.GameObjects.Sprite, direction : string) => { - if (!Player.anims.currentAnim || Player.anims.currentAnim.key !== direction) { + if (direction !== PlayerAnimationNames.None && (!Player.anims.currentAnim || Player.anims.currentAnim.key !== direction)) { Player.anims.play(direction); } else if (direction === PlayerAnimationNames.None && Player.anims.currentAnim) { - Player.anims.currentAnim.destroy(); + //Player.anims.currentAnim.destroy(); + Player.anims.stop(); } }