Add Wuzhang inheritance ending art
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import Phaser from 'phaser';
|
||||
import { soundDirector } from '../audio/SoundDirector';
|
||||
import { getBattleScenario } from '../data/battles';
|
||||
import { storyBackgroundAssets } from '../data/storyAssets';
|
||||
import { getCampaignState } from '../state/campaignState';
|
||||
import { palette } from '../ui/palette';
|
||||
|
||||
export class EndingScene extends Phaser.Scene {
|
||||
private readonly backgroundKey = 'story-weishui-northbank';
|
||||
private readonly backgroundKey = 'story-wuzhang-jiangwei-inheritance';
|
||||
private ready = false;
|
||||
|
||||
constructor() {
|
||||
@@ -30,7 +31,9 @@ export class EndingScene extends Phaser.Scene {
|
||||
latestBattleId: campaign.latestBattleId ?? null,
|
||||
completedBattles: Object.keys(campaign.battleHistory).length,
|
||||
rosterCount: campaign.roster.length,
|
||||
endingTitle: '북벌의 끝과 남은 뜻'
|
||||
endingTitle: '북벌의 끝과 남은 뜻',
|
||||
backgroundKey: this.backgroundKey,
|
||||
backgroundReady: this.textures.exists(this.backgroundKey)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -76,6 +79,7 @@ export class EndingScene extends Phaser.Scene {
|
||||
private drawEnding() {
|
||||
const { width, height } = this.scale;
|
||||
const campaign = getCampaignState();
|
||||
const latestBattleTitle = campaign.latestBattleId ? getBattleScenario(campaign.latestBattleId).title : '기록 없음';
|
||||
const textureKey = this.textures.exists(this.backgroundKey) ? this.backgroundKey : 'ending-fallback';
|
||||
const background = this.add.image(width / 2, height / 2, textureKey);
|
||||
const source = this.textures.get(textureKey).getSourceImage();
|
||||
@@ -121,7 +125,7 @@ export class EndingScene extends Phaser.Scene {
|
||||
|
||||
const summary = [
|
||||
`완료 전투 ${completedBattles}개`,
|
||||
`최종 전장 ${campaign.latestBattleId ? '위수 북안 압박전' : '기록 없음'}`,
|
||||
`최종 전장 ${latestBattleTitle}`,
|
||||
`합류 무장 ${campaign.roster.length}명`,
|
||||
`군영 공명 ${campaign.bonds.length}개`
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user