Spaces:
Running
Running
File size: 623 Bytes
4ee4376 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
export default class simulation {
constructor (options) {
this.scene = options.scene;
this.common = this.scene.sys.game.common;
this.sims = [];
this.simTick = 0;
this.paused = false;
this.timer = this.scene.time.addEvent({
delay: 1000,
callback: () => { this.tick(); },
cellbackScope: this,
loop: true
});
}
tick () {
if (this.paused)
return;
this.sims.forEach((sim) => {
});
this.simTick++;
}
register () {
}
deregister () {
}
sleep () {
this.paused = true;
}
wake () {
this.paused = false;
}
} |