Update drop-and-fusion-engine.ts
This commit is contained in:
parent
e33c8bf43a
commit
028800c0bb
|
@ -424,7 +424,9 @@ export class DropAndFusionGame extends EventEmitter<{
|
||||||
|
|
||||||
Matter.Engine.update(this.engine, this.TICK_DELTA);
|
Matter.Engine.update(this.engine, this.TICK_DELTA);
|
||||||
|
|
||||||
|
if (!this.isGameOver) {
|
||||||
this.tickRaf = window.requestAnimationFrame(playTick);
|
this.tickRaf = window.requestAnimationFrame(playTick);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
playTick();
|
playTick();
|
||||||
|
@ -448,8 +450,10 @@ export class DropAndFusionGame extends EventEmitter<{
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Matter.Engine.update(this.engine, this.TICK_DELTA);
|
Matter.Engine.update(this.engine, this.TICK_DELTA);
|
||||||
|
if (!this.isGameOver) {
|
||||||
this.tickRaf = window.requestAnimationFrame(this.tick);
|
this.tickRaf = window.requestAnimationFrame(this.tick);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async load() {
|
public async load() {
|
||||||
await this.loadMonoTextures();
|
await this.loadMonoTextures();
|
||||||
|
|
Loading…
Reference in a new issue