Default Enter to continue saved campaigns
This commit is contained in:
@@ -55,7 +55,7 @@ export class TitleScene extends Phaser.Scene {
|
|||||||
|
|
||||||
this.input.once('pointerdown', unlockAudio);
|
this.input.once('pointerdown', unlockAudio);
|
||||||
this.input.keyboard?.once('keydown', unlockAudio);
|
this.input.keyboard?.once('keydown', unlockAudio);
|
||||||
this.input.keyboard?.once('keydown-ENTER', () => this.requestStartGame());
|
this.input.keyboard?.once('keydown-ENTER', () => this.activateDefaultMenuAction());
|
||||||
}
|
}
|
||||||
|
|
||||||
private shouldOpenDebugSortiePrep() {
|
private shouldOpenDebugSortiePrep() {
|
||||||
@@ -497,6 +497,15 @@ export class TitleScene extends Phaser.Scene {
|
|||||||
this.newGameConfirmPanel = undefined;
|
this.newGameConfirmPanel = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private activateDefaultMenuAction() {
|
||||||
|
if (hasCampaignSave()) {
|
||||||
|
this.continueGame();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.startGame();
|
||||||
|
}
|
||||||
|
|
||||||
private startGame() {
|
private startGame() {
|
||||||
soundDirector.start();
|
soundDirector.start();
|
||||||
soundDirector.resume();
|
soundDirector.resume();
|
||||||
|
|||||||
Reference in New Issue
Block a user