ThreeKingdomsSlingshot/Assets/Scripts/OutGame/Event/EventState.cs

80 lines
3.6 KiB
C#
Raw Normal View History

이벤트 화면 — 출석부(오픈 기념 7일 · 일일 14일) · 7일 특별 미션 · 행운 룰렛 · 이벤트 미션 · 선물 팩 팝업 · 특별 이벤트 「준비 중」 (PD 2026-11-19 「게임에 구현해」 · 시안 7장 event_attend/final/mock) PD 결정 4건(모두 추천안): - ① 로비 오른쪽 「이벤트」 버튼 · 기기 세이브 모드만(OutGameSession.EventAvailable · ServerSession = false → 준비 중 · 서버 이벤트 API = 따로) - ② 유료 선물 팩 = 「결제 준비 중」 토스트만(지급 0) · 광고 칸 = 시험 즉시 지급 하루 3회 - ③⑤ 값 = 시안 예시 그대로 게임 표 · 룰렛 판 = 시안 돌(흰 · 검은 · 최종 금 상감) · 등급 색 = 확률 정보 창에만 - ④ 하루 = 0시 · 접속일 기준(출석 = 접속한 날마다 1칸 · 일일 14일 = 다 받으면 새 회차 · 7일 미션 = 첫 접속일부터 하루 1일차 · 룰렛 = 표 날짜 · 문구 「오전 5시」 → 「0시」) - 규칙 표 Resources/Event/*.csv(event_config · items · kinds · attend · mission7(_steps) · roulette(_extra)) → EventData · EventRules · 세이브 SaveData.ev(EventState) - 화면 OutGame/Event/EventScreen(+ Attend · Mission · Roulette · EventSpin) · 화면 표 Resources/UI/Event/event_screen.csv · 글자 event_text.csv(그림에 글자 0) - 층(P41) = Bg(Static) · Page/Art(Static) · Page/Info(Event + 레이캐스터) · Page/Fx(Frame) · EventTabs(Event) · 부품 아틀라스 UI_Event - 미션 집계 = OutGameSession 동작 성공 경로마다 EventRules.Count 한 줄 · OutGameRoot(이벤트 화면 등록 · ShowEvents · OwnTabBar) · LobbyScreen(이벤트 버튼 + 받을 것 붉은 점) - 받은 칸 탈색 셰이더 Resources/UI/UiGray.shader · 세로 그러데이션 OutGame/UI/UiGradient · 임포트 분기 UnitArtImporter UiEventRoot - 공용 표 읽기 OutGame/UI/ScreenTable 함께 올림(이벤트 화면이 씀 · 같은 날 영웅 배경 · 편성 미커밋 작업에서 만든 파일) - 캡처 UICaptureDriver -uiOnly event_*(9장) · 테스트 EventTests 2 검증: 컴파일 오류 0 · EventTests 2/2 · OutGameTests.Lobby_Tabs_Back_ComingSoon 1/1 · UILayerTests.Canvases_SplitByUpdateRate_InputAndAtlas 1/1 · 캡처 9장 시안 대조 · Fable QA r1 PASS(B 0) → M 일괄 수정 · 이 커밋 묶음만(HEAD + 이벤트) 검증 사본 배치 컴파일 오류 0 섞인 파일(OutGameRoot · LobbyScreen · UICaptureDriver · CLAUDE.md)은 이벤트 부분만 올림 — 메뉴 숨김 · 팝업 글꼴 · 영웅 배경 · 편성 변경은 작업 트리에 그대로(미커밋) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:37:08 +00:00
using System;
using System.Collections.Generic;
using UnityEngine;
namespace TKS.OutGame
{
/// <summary>
/// 이벤트 세이브(PD 2026-11-19 「게임에 구현해」 · 기기 세이브 모드만 · PD 결정 ①) — 날짜 = EconomyRules.DayKey(게임 공통 0시 · PD 결정 ④).
/// 출석 = 접속한 날 수 · 받은 칸 수 · 미션 · 룰렛 진행 = 카운터(누적 · 룰렛 회차 · 오늘) + 받은 목록.
/// </summary>
[Serializable]
public class EventState
{
[Tooltip("첫 접속일(yyyyMMdd) — 오픈 기념 출석 · 7일 미션 기준")]
public string firstDay = "";
[Tooltip("마지막 접속일 — 바뀌면 출석 칸 +1 · 오늘 카운터 · 일일 미션 · 광고 초기화")]
public string lastDay = "";
public int att7Days;
public int att7Got;
public int att14Days;
public int att14Got;
[Tooltip("일일 14일 출석 회차(다 받으면 다음 접속일에 +1)")]
public int att14Cycle;
[Tooltip("첫 접속일부터 누적 카운터(7일 미션)")]
public List<CountEntry> counts = new List<CountEntry>();
[Tooltip("받은 7일 미션(일차-순서)")]
public List<string> m7Got = new List<string>();
[Tooltip("받은 점수 단계(n_point)")]
public List<int> m7Steps = new List<int>();
[Tooltip("룰렛 회차(시작 날짜) — 표 roulette_start 가 바뀌면 룰렛 진행 초기화")]
public string rouId = "";
public int pouch;
public int draws;
public int sinceFinal;
public int sinceLimited;
[Tooltip("지금 칸(마지막에 멈춘 칸)")]
public int cursor;
public List<int> countGot = new List<int>();
[Tooltip("룰렛 회차 시작부터 카운터(이벤트 미션 event)")]
public List<CountEntry> rouCounts = new List<CountEntry>();
public List<int> questGot = new List<int>();
[Tooltip("오늘 받은 일일 이벤트 미션(n_order)")]
public List<int> questDayGot = new List<int>();
[Tooltip("오늘 카운터(일일 이벤트 미션)")]
public List<CountEntry> dayCounts = new List<CountEntry>();
public int adToday;
[Tooltip("선물 팩 구매 수(n_order → 수 · 회차)")]
public List<CountEntry> packBought = new List<CountEntry>();
/// <summary>읽은 세이브의 빈 목록을 채운다(필드가 늘어난 구버전).</summary>
public void Sanitize()
{
if (firstDay == null) firstDay = "";
if (lastDay == null) lastDay = "";
if (rouId == null) rouId = "";
if (counts == null) counts = new List<CountEntry>();
if (m7Got == null) m7Got = new List<string>();
if (m7Steps == null) m7Steps = new List<int>();
if (countGot == null) countGot = new List<int>();
if (rouCounts == null) rouCounts = new List<CountEntry>();
if (questGot == null) questGot = new List<int>();
if (questDayGot == null) questDayGot = new List<int>();
if (dayCounts == null) dayCounts = new List<CountEntry>();
if (packBought == null) packBought = new List<CountEntry>();
}
/// <summary>룰렛 회차를 새로(복주머니 · 횟수 · 받은 보상 · 회차 카운터 · 팩).</summary>
public void ResetRoulette(string id)
{
rouId = id ?? "";
pouch = draws = sinceFinal = sinceLimited = cursor = 0;
countGot.Clear();
rouCounts.Clear();
questGot.Clear();
packBought.Clear();
}
}
}