Add save slot UI and growth result gauges
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
getCampaignState,
|
||||
getFirstBattleReport,
|
||||
markCampaignStep,
|
||||
saveCampaignState,
|
||||
type CampaignState,
|
||||
type FirstBattleReport
|
||||
} from '../state/campaignState';
|
||||
@@ -150,7 +151,13 @@ export class CampScene extends Phaser.Scene {
|
||||
this.addTabButton('장수', 'status', 742, 38);
|
||||
this.addTabButton('대화', 'dialogue', 830, 38);
|
||||
this.addTabButton('정비', 'supplies', 918, 38);
|
||||
this.addCommandButton('다음 이야기', 1080, 38, 150, () => {
|
||||
this.addCommandButton('저장', 1002, 38, 76, () => {
|
||||
soundDirector.playSelect();
|
||||
this.campaign = saveCampaignState(getCampaignState());
|
||||
this.showCampNotice(`슬롯 ${this.campaign.activeSaveSlot}에 군영 진행을 저장했습니다.`);
|
||||
this.render();
|
||||
});
|
||||
this.addCommandButton('다음 이야기', 1120, 38, 142, () => {
|
||||
soundDirector.playSelect();
|
||||
markCampaignStep('first-victory-story');
|
||||
this.scene.start('StoryScene', { pages: firstBattleVictoryPages, nextScene: 'TitleScene' });
|
||||
@@ -448,12 +455,16 @@ export class CampScene extends Phaser.Scene {
|
||||
}
|
||||
|
||||
private showDialogueReward(dialogue: CampDialogue) {
|
||||
this.showCampNotice(`${dialogue.title} 완료 · 공명 +${dialogue.rewardExp}`);
|
||||
}
|
||||
|
||||
private showCampNotice(message: string) {
|
||||
this.dialogueObjects.forEach((object) => object.destroy());
|
||||
this.dialogueObjects = [];
|
||||
const box = this.add.rectangle(this.scale.width / 2, 104, 440, 52, 0x101820, 0.96);
|
||||
box.setStrokeStyle(2, palette.gold, 0.84);
|
||||
box.setDepth(30);
|
||||
const text = this.add.text(this.scale.width / 2, 104, `${dialogue.title} 완료 · 공명 +${dialogue.rewardExp}`, this.textStyle(17, '#f2e3bf', true));
|
||||
const text = this.add.text(this.scale.width / 2, 104, message, this.textStyle(17, '#f2e3bf', true));
|
||||
text.setOrigin(0.5);
|
||||
text.setDepth(31);
|
||||
this.dialogueObjects.push(box, text);
|
||||
|
||||
Reference in New Issue
Block a user