ThreeKingdomsSlingshot/Assets/Scripts/OutGame/Treasure/TreasureScene.cs

40 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections.Generic;
namespace TKS.OutGame
{
/// <summary>
/// 보물 장면 표(Resources/UI/treasure_scene.csv · PD 2026-11-13 「보물 메뉴 배경 = 보물고(세트 탭도 같음) · 상자 = 화려한 금고 속 받침대 위 상자」) —
/// 형식 = 로비 장면 표(LobbyScene.Load) · 종류 = &lt;장면&gt;_&lt;종류&gt;(vault = 보유 중·세트 · chest = 상자) · 좌표 = 그 장면 배경 그림 px(1080×1920).
/// 배경 = 내정과 같은 코드(DomesticScene.Backdrop · LobbyAmbient). 배경을 바꾸면 이 표만 고친다(C45).
/// </summary>
public static class TreasureScene
{
public const string TablePath = "UI/treasure_scene";
/// <summary>페이지(보유 중 · 세트 · 상자) → 장면 이름.</summary>
public static readonly string[] PageScene = { "vault", "vault", "chest" };
static List<LobbyScene.Row> rows;
public static void Reload()
{
rows = null;
}
/// <summary>장면 줄 = 접두(「vault_」 등)를 뗀 종류로 복사.</summary>
public static List<LobbyScene.Row> Scene(string scene)
{
if (rows == null) rows = LobbyScene.Load(TablePath);
var list = new List<LobbyScene.Row>();
string pre = scene + "_";
foreach (var r in rows)
{
if (!r.kind.StartsWith(pre)) continue;
var c = r.Clone();
c.kind = r.kind.Substring(pre.Length);
list.Add(c);
}
return list;
}
}
}