diff --git a/back/package.json b/back/package.json index 29432fd3..8434d20d 100644 --- a/back/package.json +++ b/back/package.json @@ -40,7 +40,7 @@ }, "homepage": "https://github.com/thecodingmachine/workadventure#readme", "dependencies": { - "@workadventure/tiled-map-type-guard": "^1.0.2", + "@workadventure/tiled-map-type-guard": "^1.0.3", "axios": "^0.21.2", "busboy": "^0.3.1", "circular-json": "^0.5.9", diff --git a/back/yarn.lock b/back/yarn.lock index bffc5c6a..8525ac8e 100644 --- a/back/yarn.lock +++ b/back/yarn.lock @@ -194,10 +194,10 @@ semver "^7.3.2" tsutils "^3.17.1" -"@workadventure/tiled-map-type-guard@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@workadventure/tiled-map-type-guard/-/tiled-map-type-guard-1.0.2.tgz#4171550f6cd71be19791faef48360d65d698bcb0" - integrity sha512-RCtygGV5y9cb7QoyGMINBE9arM5pyXjkxvXgA5uXEv4GDbXKorhFim/rHgwbVR+eFnVF3rDgWbRnk3DIaHt+lQ== +"@workadventure/tiled-map-type-guard@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@workadventure/tiled-map-type-guard/-/tiled-map-type-guard-1.0.3.tgz#62c2061cacbe1360b84162af0b7e4639ed8bfa7e" + integrity sha512-pUMxBBZHYAFkpnGWZAVAE8+M+Wn9UtzqZhXvBBBbB1gEakHIka7ahdTGfh0DgRaWrVszVXOP3tf49Dhdmn9pDg== dependencies: generic-type-guard "^3.4.1" diff --git a/front/src/Phaser/Entity/Character.ts b/front/src/Phaser/Entity/Character.ts index 7e97e112..29ce2272 100644 --- a/front/src/Phaser/Entity/Character.ts +++ b/front/src/Phaser/Entity/Character.ts @@ -62,11 +62,13 @@ export abstract class Character extends Container { .then((textures) => { this.addTextures(textures, frame); this.invisible = false; + this.playAnimation(direction, moving); }) .catch(() => { return lazyLoadPlayerCharacterTextures(scene.load, [ "color_22", "eyes_23" ]).then((textures) => { this.addTextures(textures, frame); this.invisible = false; + this.playAnimation(direction, moving); }); }); @@ -109,8 +111,6 @@ export abstract class Character extends Container { this.getBody().setOffset(0, 8); this.setDepth(-1); - this.playAnimation(direction, moving); - if (typeof companion === "string") { this.addCompanion(companion, companionTexturePromise); }