Skip to content

Commit

Permalink
Fix loading
Browse files Browse the repository at this point in the history
  • Loading branch information
solstice23 committed May 13, 2024
1 parent 08baf1b commit e9965a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/modules/Main/Playfield/ObjectsCanvas.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,11 @@ class PixiManager {
}
setObjects(objects) {
this.objects = objects;
if (this.rendering) this.initFruits();
//this.applyToAllFruits(fruit => fruit.updateVisualStyle());
//if (this.rendering) this.initFruits();
for (let i = 0; i < this.objects.length; i++) {
if (this.fruits[i]) this.fruits[i].setObject(this.objects[i]);
}
this.applyToAllFruits(fruit => fruit.updateVisualStyle());
}
setRendering(rendering) {
this.rendering = rendering;
Expand All @@ -195,7 +198,6 @@ class PixiManager {
const fruit = new Fruit(this, obj);
this.fruits.push(fruit);
}
this.render(true);
}

applyToAllFruits(func) {
Expand Down

0 comments on commit e9965a1

Please sign in to comment.