Merge pull request #1524 from thecodingmachine/player-direction
Display the real sprite direction on character loaded
This commit is contained in:
commit
4abf7208ff
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user