fixed timeline controls

This commit is contained in:
2025-06-02 20:57:29 +02:00
parent 102c1f59dc
commit 61b86b7a60
6 changed files with 298 additions and 286 deletions

View File

@@ -44,19 +44,25 @@ export class GameComponent {
}
rewind() {
if (this.simMain.currentLevel)
this.simMain.currentLevel.currentStep = -1;
this.simMain.currentStep = -1;
const wasActive = this.visMain.active;
if (wasActive)
this.visMain.stop();
this.simMain.rewind();
if (wasActive)
this.visMain.start();
}
startNextWave() {
this.simMain.addCommand(new SimCommandStartNextWave());
this.simMain.currentLevel!.paused = false;
}
fastForward() {
const wasActive = this.visMain.active;
if (wasActive)
this.visMain.stop();
this.simMain.executeToEnd();
if (wasActive)
this.visMain.start();
}
async loadGdRoot(): Promise<GdRoot> {