chore: duh
This commit is contained in:
parent
afd449da2f
commit
6e8e88f23e
|
@ -139,10 +139,7 @@ export default (latus) => class Pictured extends decorate(Trait) {
|
|||
|
||||
traitAdded: () => {
|
||||
Object.keys(this.#sprites).forEach((key) => {
|
||||
const method = key === this.#currentImage
|
||||
? 'showImage'
|
||||
: 'hideImage';
|
||||
this[method](key);
|
||||
this[`${key === this.#currentImage ? 'show' : 'hide'}Image`](key);
|
||||
});
|
||||
this.setSpriteScale();
|
||||
this.entity.forceBoundingBoxUpdate();
|
||||
|
@ -192,10 +189,10 @@ export default (latus) => class Pictured extends decorate(Trait) {
|
|||
if (!this.#sprites) {
|
||||
return;
|
||||
}
|
||||
const rawScale = this.entity.visibleScale;
|
||||
const {visibleScale} = this.entity;
|
||||
const sprites = Object.values(this.#sprites);
|
||||
for (let i = 0; i < sprites.length; i++) {
|
||||
sprites[i].scale = rawScale;
|
||||
sprites[i].scale = visibleScale;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user