32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using UnityEngine;
|
||
|
||
namespace Cielonos.MainGame
|
||
{
|
||
/// <summary>
|
||
/// 玩家进入地图区域时的上下文信息,由 RunManager.OnZoneEntered 事件传递。
|
||
/// 不可变结构体,订阅者可安全缓存。
|
||
/// </summary>
|
||
public readonly struct ZoneEntryContext
|
||
{
|
||
/// <summary>目标区域的网格坐标。</summary>
|
||
public readonly Vector2Int position;
|
||
|
||
/// <summary>目标区域对应的地图节点数据。</summary>
|
||
public readonly RunMapNode node;
|
||
|
||
/// <summary>本局中是否首次进入该区域(首次访问为 true,重访为 false)。</summary>
|
||
public readonly bool isFirstVisit;
|
||
|
||
/// <summary>该区域是否已完成过(战斗已清空等)。</summary>
|
||
public readonly bool isCompleted;
|
||
|
||
public ZoneEntryContext(Vector2Int position, RunMapNode node, bool isFirstVisit, bool isCompleted)
|
||
{
|
||
this.position = position;
|
||
this.node = node;
|
||
this.isFirstVisit = isFirstVisit;
|
||
this.isCompleted = isCompleted;
|
||
}
|
||
}
|
||
}
|