41 lines
1.6 KiB
C#
41 lines
1.6 KiB
C#
using UnityEngine;
|
||
using BaseGames.Player;
|
||
|
||
namespace BaseGames.World.Map
|
||
{
|
||
/// <summary>
|
||
/// 区域定义 SO。集中管理区域元数据:Identity、地图展示、存档槽背景图、解锁条件。
|
||
///
|
||
/// 房间归属关系由 <see cref="MapRoomDataSO.RegionId"/> 维护(单一权威来源)。
|
||
/// <see cref="RegionRegistrySO"/> 运行时从 <see cref="MapDatabaseSO"/> 构建 SceneName → Region 缓存,
|
||
/// 不再在此 SO 维护 roomSceneNames 冗余字段。
|
||
///
|
||
/// 资产路径: Assets/_Game/Data/Map/Regions/Region_{regionId}.asset
|
||
/// </summary>
|
||
[CreateAssetMenu(menuName = "BaseGames/Map/RegionDefinition", fileName = "Region_")]
|
||
public class RegionDefinitionSO : ScriptableObject
|
||
{
|
||
[Header("Identity")]
|
||
public string regionId;
|
||
public string displayName;
|
||
|
||
[Header("Map")]
|
||
public Color mapColor;
|
||
public Sprite mapIconSprite;
|
||
|
||
[Header("存档槽展示")]
|
||
[Tooltip("存档槽卡片背景图。建议 480×270,放于 Assets/_Game/Art/UI/SaveSlot/ 下,命名 SaveSlot_BG_{regionId}.png。")]
|
||
public Sprite saveSlotBackground;
|
||
|
||
[Header("解锁条件")]
|
||
[Tooltip("击败指定 Boss 后解锁此区域;留空 = 无条件。")]
|
||
public string requiredBossDefeated;
|
||
[Tooltip("需持有指定能力方可进入;None = 无要求。")]
|
||
public AbilityType requiredAbility;
|
||
|
||
[Header("导航")]
|
||
[Tooltip("从区域外部进入时的首个房间场景名(RoomId)。")]
|
||
public string entrySceneName;
|
||
}
|
||
}
|