ThreeKingdomsSlingshot/Assets/Scripts/OutGame/Trade/TradeStore.cs

59 lines
2.4 KiB
C#
Raw Normal View History

거래 상품 · 거래 UI 재설계 — 탭 4개(명장 등용 · 패키지 · 상점 · 패스) · 성장 패스 3권 · 월정액 2장 · 패키지 · 오늘의 상점 9칸 · 보옥 · 골드 · 누적 결제 · 시험 결제(PD 2026-11-26 「커밋 · 푸시」) - 표 = Resources/ContentModes/trade_*.csv 11장(기획 tables/_trade_v1 사본 · 값 그대로) · 새 낱말 supply_ticket(goods_awaken_evolve) · hero_r3_pick · 누적 결제 꾸미기 4종(costume_items) - 규칙 = OutGame/Trade(TradeRules · TradeData · TradeState · TradeStore = 기기 세이브 모드 시험 결제 · 구글 플레이 = 인터페이스만) · 세이브 SaveData.trade · 서버 모드 = 막음(후속) - 화면(PD 확정안) = 패키지 1차 A + V1 양피지 · 상점 A-2 + V2 인트로 게시판 · 패스 A-2 + V4 주문서 묶음 · 월정액 = 훈련장 배너 짜임 · 위 탭 = 명패 · 글자 = UI/Trade/trade_text.csv 키 - 그림 = 그림 세션 납품 37장(art · icons · 꾸미기 · 뽑기 · 훈련장 화풍으로 다시 그림) · 판 그림 8장(UI/Trade/ui) = 시안 임시 - 정리 = 보물 상자 탭 · 승급 장비 상점 · 떠돌이 상인 창 · 스텁 버튼 삭제 · 상자 포인트 구매 → 보물 > 상자 · 광고 제거 · 월정액 혜택 연결 · 보급전 입장권 1장 = 1회 더 - 시험 = TradeTests 14 통과 · UILayerTests 캔버스 통과 - 다른 세션 미커밋 변경은 넣지 않음(OutGameRoot · UICaptureDriver = 이 작업 줄만) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:59:28 +00:00
using System;
namespace TKS.OutGame
{
/// <summary>
/// 결제 창구(PD 2026-11-26 요청서 2절 3) — 기기 세이브 모드 = 시험 결제(화면이 확인 팝업 「시험 결제」를 띄운 뒤 바로 성공) ·
/// 구글 플레이 결제 = 인터페이스만(실제 연결 = 플레이 콘솔 상품 등록 뒤 · 범위 밖 · 상품 id = tks_&lt;s_id&gt; · 소모성 = 보옥 · 패키지 · 월정액 · 성장 패스 / 비소모성 = 광고 제거).
/// </summary>
public interface ITradeStore
{
/// <summary>시험 결제(돈이 나가지 않음 · 화면에 「시험 결제」 표시).</summary>
bool IsTest { get; }
/// <summary>결제 요청 → done(성공, 실패 사유). 지급은 부르는 쪽(OutGameSession.TradePurchase)이 한다.</summary>
void Purchase(string productId, int krw, Action<bool, string> done);
/// <summary>비소모성 구매 복원(광고 제거 · 기기를 바꿨을 때) → done(복원할 상품 id 목록).</summary>
void Restore(Action<string[]> done);
}
/// <summary>기기 세이브 모드의 시험 결제 — 확인 팝업은 화면이 띄우고 여기서는 바로 성공.</summary>
public class TestTradeStore : ITradeStore
{
public bool IsTest { get { return true; } }
public void Purchase(string productId, int krw, Action<bool, string> done)
{
done(true, null);
}
public void Restore(Action<string[]> done)
{
done(new string[0]);
}
}
/// <summary>구글 플레이 결제(Play Billing) — 인터페이스만 · 연결 전 = 실패(플레이 콘솔 상품 등록 · 결제 라이브러리 연결 = 후속).</summary>
public class GooglePlayTradeStore : ITradeStore
{
public bool IsTest { get { return false; } }
public void Purchase(string productId, int krw, Action<bool, string> done)
{
done(false, TradeText.T("trade_store_not_linked"));
}
public void Restore(Action<string[]> done)
{
done(new string[0]);
}
}
public static class TradeStore
{
/// <summary>지금 결제 창구(기본 = 시험 결제 · 구글 플레이 연결 뒤 GooglePlayTradeStore 로 바꿈).</summary>
public static ITradeStore Current = new TestTradeStore();
}
}