Skip to content

Commit

Permalink
Fix banana path updating issue
Browse files Browse the repository at this point in the history
  • Loading branch information
solstice23 committed Nov 3, 2024
1 parent 324d4ac commit 8ed3383
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 @@ -272,6 +272,11 @@ class PixiManager {

const currentTime = this.getTime();
if (currentTime == this.lastTime && !force) { this.lastTime = currentTime; return; }

// update banana path polylines
this.applyToAllPolyLines(polyline => polyline.updatePosition());

// update fruits
const preempt = this.getPreempt();
const startTime = currentTime - 200, endTime = currentTime + preempt + 200;
if (Math.abs(currentTime - this.lastTime) > 20000 || force) {
Expand Down Expand Up @@ -315,9 +320,6 @@ class PixiManager {
delete this.onScreenFruits[key];
}
}

// update banana path polylines
this.applyToAllPolyLines(polyline => polyline.updatePosition());
}

destory() {
Expand Down

0 comments on commit 8ed3383

Please sign in to comment.