Update drop-and-fusion-engine.ts

This commit is contained in:
syuilo 2024-01-09 20:32:40 +09:00
parent e33c8bf43a
commit 028800c0bb
1 changed files with 6 additions and 2 deletions

View File

@ -424,7 +424,9 @@ export class DropAndFusionGame extends EventEmitter<{
Matter.Engine.update(this.engine, this.TICK_DELTA);
if (!this.isGameOver) {
this.tickRaf = window.requestAnimationFrame(playTick);
}
};
playTick();
@ -448,8 +450,10 @@ export class DropAndFusionGame extends EventEmitter<{
}
});
Matter.Engine.update(this.engine, this.TICK_DELTA);
if (!this.isGameOver) {
this.tickRaf = window.requestAnimationFrame(this.tick);
}
}
public async load() {
await this.loadMonoTextures();