Files
Cielonos/Assets/Scripts/MainGame/GameRun/ZoneEntryContext.cs
SoulliesOfficial 649b7a5ddc 更新
2026-05-23 08:27:50 -04:00

32 lines
1.1 KiB
C#
Raw Permalink 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 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;
}
}
}