Skip to content

Commit

Permalink
Don't stop rendering when the game pauses
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdubbelboer committed Dec 17, 2023
1 parent 2e6678e commit 658a2b2
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export class Game extends EventEmitter {

// When the user switches tabs or minimizes the window we pause the game.
this.pageHideBlurHandler = () => {
this.app.ticker.stop();
PIXI.Ticker.shared.stop();
if (this.ticker.started) {
// Show the paused menu.
Expand Down Expand Up @@ -163,7 +162,6 @@ export class Game extends EventEmitter {
this.sounds.resumeMusic();

this.ticker.start();
this.app.ticker.start();
PIXI.Ticker.shared.start();
}, ms || 0);
}
Expand Down Expand Up @@ -195,7 +193,6 @@ export class Game extends EventEmitter {

setup() {
this.ticker.start();
this.app.ticker.start();
PIXI.Ticker.shared.start();

// We put the whole world in a container so we can pivot it around the player if needed.
Expand Down Expand Up @@ -677,7 +674,6 @@ export class Game extends EventEmitter {
clearTimeout(this.resumeTimeout);
}

this.app.ticker.stop();
PIXI.Ticker.shared.stop();

this.ticker.destroy();
Expand Down

0 comments on commit 658a2b2

Please sign in to comment.