feat: improve combat feedback and progression
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
import Phaser from 'phaser';
|
||||
import { soundDirector } from '../audio/SoundDirector';
|
||||
import {
|
||||
combatPresentationModeLabel,
|
||||
loadCombatPresentationMode,
|
||||
nextCombatPresentationMode,
|
||||
saveCombatPresentationMode
|
||||
} from '../settings/combatPresentation';
|
||||
import { battleIdForCampaignStep, isCampCampaignStep } from '../state/campaignRouting';
|
||||
import {
|
||||
hasCampaignSave,
|
||||
@@ -371,10 +377,10 @@ export class TitleScene extends Phaser.Scene {
|
||||
this.closeSaveSlotPanel();
|
||||
|
||||
const panel = this.add.container(x, y + ui(238));
|
||||
const backdrop = this.add.rectangle(0, 0, ui(286), ui(204), 0x0e151d, 0.9);
|
||||
const backdrop = this.add.rectangle(0, 0, ui(286), ui(250), 0x0e151d, 0.9);
|
||||
backdrop.setStrokeStyle(ui(1), palette.gold, 0.52);
|
||||
|
||||
const title = this.add.text(0, -ui(74), '설정', {
|
||||
const title = this.add.text(0, -ui(96), '설정', {
|
||||
fontSize: uiPx(24),
|
||||
color: '#f1e3c2',
|
||||
fontStyle: '700',
|
||||
@@ -383,20 +389,28 @@ export class TitleScene extends Phaser.Scene {
|
||||
});
|
||||
title.setOrigin(0.5);
|
||||
|
||||
const soundText = this.createSettingsButton(0, -ui(16), this.soundLabel());
|
||||
const soundText = this.createSettingsButton(0, -ui(38), this.soundLabel());
|
||||
soundText.on('pointerdown', () => {
|
||||
soundDirector.setMuted(!soundDirector.isMuted());
|
||||
soundText.setText(this.soundLabel());
|
||||
soundDirector.playSelect();
|
||||
});
|
||||
|
||||
const close = this.createSettingsButton(0, ui(42), '닫기');
|
||||
const presentationText = this.createSettingsButton(0, ui(16), this.combatPresentationLabel());
|
||||
presentationText.on('pointerdown', () => {
|
||||
const nextMode = nextCombatPresentationMode(loadCombatPresentationMode());
|
||||
saveCombatPresentationMode(nextMode);
|
||||
presentationText.setText(this.combatPresentationLabel());
|
||||
soundDirector.playSelect();
|
||||
});
|
||||
|
||||
const close = this.createSettingsButton(0, ui(68), '닫기');
|
||||
close.on('pointerdown', () => {
|
||||
soundDirector.playSelect();
|
||||
this.closeSettingsPanel();
|
||||
});
|
||||
|
||||
const hint = this.add.text(0, ui(78), 'Esc 닫기', {
|
||||
const hint = this.add.text(0, ui(104), '연출 항목을 눌러 단계 변경 · Esc 닫기', {
|
||||
fontFamily: '"Malgun Gothic", "Noto Sans KR", sans-serif',
|
||||
fontSize: uiPx(11),
|
||||
color: '#9fb0bf',
|
||||
@@ -406,7 +420,7 @@ export class TitleScene extends Phaser.Scene {
|
||||
});
|
||||
hint.setOrigin(0.5);
|
||||
|
||||
panel.add([backdrop, title, soundText, close, hint]);
|
||||
panel.add([backdrop, title, soundText, presentationText, close, hint]);
|
||||
panel.setAlpha(0);
|
||||
this.settingsPanel = panel;
|
||||
this.tweens.add({ targets: panel, alpha: 1, y: y + ui(228), duration: 160, ease: 'Sine.easeOut' });
|
||||
@@ -432,6 +446,10 @@ export class TitleScene extends Phaser.Scene {
|
||||
return `음향: ${soundDirector.isMuted() ? '꺼짐' : '켜짐'}`;
|
||||
}
|
||||
|
||||
private combatPresentationLabel() {
|
||||
return `전투 연출: ${combatPresentationModeLabel(loadCombatPresentationMode())}`;
|
||||
}
|
||||
|
||||
private closeSettingsPanel() {
|
||||
this.settingsPanel?.destroy();
|
||||
this.settingsPanel = undefined;
|
||||
|
||||
Reference in New Issue
Block a user