Add campaign battle rewards

This commit is contained in:
2026-07-03 23:21:30 +09:00
parent aafe210977
commit 0c4e358284
5 changed files with 265 additions and 13 deletions

View File

@@ -19,6 +19,14 @@ export class TitleScene extends Phaser.Scene {
this.settingsPanel = undefined;
this.navigating = false;
const debugBattleId = this.debugBattleId();
if (debugBattleId) {
this.time.delayedCall(0, () => {
void this.navigateTo('BattleScene', { battleId: debugBattleId });
});
return;
}
if (this.shouldOpenDebugSortiePrep()) {
this.time.delayedCall(0, () => {
void this.navigateTo('CampScene', {
@@ -55,6 +63,17 @@ export class TitleScene extends Phaser.Scene {
return params.has('debugSortiePrep') && (params.has('debug') || import.meta.env.DEV);
}
private debugBattleId() {
if (typeof window === 'undefined') {
return undefined;
}
const params = new URLSearchParams(window.location.search);
if (!params.has('debugBattle') || (!params.has('debug') && !import.meta.env.DEV)) {
return undefined;
}
return params.get('debugBattle')?.trim() || undefined;
}
private drawBackground(width: number, height: number) {
const background = this.add.image(width / 2, height / 2, 'title-taoyuan');
const texture = this.textures.get('title-taoyuan').getSourceImage();