地图系统
This commit is contained in:
@@ -33,6 +33,24 @@ namespace BaseGames.World.Map
|
||||
/// <summary>返回属于指定区域的所有房间数据;regionId 为空时返回空数组。</summary>
|
||||
MapRoomDataSO[] GetRoomsByRegion(string regionId);
|
||||
|
||||
// ── 定位门控(Locator / 指南针)────────────────────────────────────────
|
||||
|
||||
/// <summary>
|
||||
/// 是否已启用"定位"能力(由指南针类护符解锁)。
|
||||
/// 为 false 时,地图 UI 应隐藏玩家位置点——玩家能看地图但不知自己在哪。
|
||||
/// 由 <see cref="SetLocatorEnabled"/> 控制,跨存档持久化。
|
||||
/// </summary>
|
||||
bool IsLocatorEnabled { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 设置定位能力开关(拾取/装备指南针道具时调用 true)。
|
||||
/// 状态变化时触发 <see cref="OnLocatorChanged"/> 并写入存档。
|
||||
/// </summary>
|
||||
void SetLocatorEnabled(bool enabled);
|
||||
|
||||
/// <summary>定位能力开关变化时触发;地图 UI 据此显示/隐藏玩家位置点。</summary>
|
||||
event Action OnLocatorChanged;
|
||||
|
||||
/// <summary>
|
||||
/// 当地图数据库结构发生变化(房间增删/编辑器热改/运行时热更)时触发。
|
||||
/// MapPanel、MinimapHUD 等 UI 应订阅此事件以执行完整重建。
|
||||
|
||||
Reference in New Issue
Block a user