fixed timeline controls
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user