mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-09 11:31:49 +00:00
18 lines
455 B
TypeScript
18 lines
455 B
TypeScript
|
import Clock = Phaser.Time.Clock;
|
||
|
|
||
|
|
||
|
export class MockClock extends Clock {
|
||
|
constructor(scene) {
|
||
|
super(scene);
|
||
|
setInterval(() => {
|
||
|
/*
|
||
|
To simulate frame update
|
||
|
eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);
|
||
|
eventEmitter.on(SceneEvents.UPDATE, this.update, this);
|
||
|
*/
|
||
|
this.preUpdate(this.systems.game.loop.time, 100);
|
||
|
this.update(this.systems.game.loop.time, 100);
|
||
|
}, 100);
|
||
|
}
|
||
|
}
|