feat: About 다이얼로그 추가, UI 최적화 및 서버 캐싱 강화
- About 다이얼로그 추가 (개발자 정보 및 개인정보처리방침) - Markdown 렌더러 구현 (Bold, Italic, Code, Blockquote 지원) - 전투 화면 하단 'About' 및 방문자 카운팅 UI 재배치 및 디자인 통일 - 프로덕션 환경에서 정적 파일 강력 캐싱 설정 (7일 유지) - 파비콘 404 오류 해결을 위한 이모지 데이터 URI 추가 - 모바일 전투 화면 레이아웃 최적화 및 승리 연출 개선 - 일일 운영 지표(Daily Metrics) 수집 API 및 로직 추가
This commit is contained in:
@@ -30,6 +30,7 @@ import { createFighter, syncFighterHud } from "../fighter/fighterFactory.js";
|
||||
import { fighterManifest } from "../fighter/fighterManifest.js";
|
||||
import { pickFighters } from "../fighter/fighterSelection.js";
|
||||
import { createMatchSetup, matchStatusText } from "../match/matchSetup.js";
|
||||
import { trackMatchFinish, trackMatchStart } from "../../ui/dailyMetrics.js";
|
||||
import { addTodayDeathStats, fetchTodayDeathStats } from "../../ui/deathStats.js";
|
||||
import { createFighterPlans, clusterSpawnPosition, syncTeamSizes } from "../match/arenaMatchRuntime.js";
|
||||
import {
|
||||
@@ -68,13 +69,14 @@ import {
|
||||
} from "../../ui/battleDeathNotice.js";
|
||||
|
||||
export class ArenaScene extends Phaser.Scene {
|
||||
constructor({ getInitialMatchConfig, setStatus }) {
|
||||
constructor({ getInitialMatchConfig, onMatchEnd, setStatus }) {
|
||||
super("arena");
|
||||
this.fighters = [];
|
||||
this.getInitialMatchConfig = getInitialMatchConfig;
|
||||
this.matchId = 0;
|
||||
this.matchOver = false;
|
||||
this.matchPaused = false;
|
||||
this.onMatchEnd = typeof onMatchEnd === "function" ? onMatchEnd : () => {};
|
||||
this.presentationMode = true;
|
||||
this.ready = false;
|
||||
this.updateStatus = typeof setStatus === "function" ? setStatus : () => {};
|
||||
@@ -197,6 +199,7 @@ export class ArenaScene extends Phaser.Scene {
|
||||
this.fighters = fighterPlans.map((fighterPlan) => createFighter(this, fighterPlan));
|
||||
|
||||
if (!silent) {
|
||||
trackMatchStart();
|
||||
this.setStatus(matchStatusText(this.teams));
|
||||
} else {
|
||||
this.focusPresentationCombat();
|
||||
@@ -906,6 +909,10 @@ update(time) {
|
||||
}
|
||||
|
||||
finishMatch() {
|
||||
if (this.matchOver) {
|
||||
return;
|
||||
}
|
||||
|
||||
const livingFighters = this.fighters.filter((fighter) => !fighter.isDead);
|
||||
const livingTeams = new Set(livingFighters.map((fighter) => fighter.team.id));
|
||||
|
||||
@@ -934,6 +941,7 @@ update(time) {
|
||||
|
||||
this.clearBattleNotice();
|
||||
this.persistDailyDeathStats();
|
||||
trackMatchFinish();
|
||||
|
||||
if (livingTeams.size === 1) {
|
||||
const winningTeamId = Array.from(livingTeams)[0];
|
||||
@@ -942,5 +950,7 @@ update(time) {
|
||||
} else {
|
||||
this.setStatus("무승부!");
|
||||
}
|
||||
|
||||
this.onMatchEnd();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user