Files
Cielonos/Assets/Scripts/MainGame/GameRun/RunState.cs
2026-05-10 11:47:55 -04:00

62 lines
2.7 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;
using System.Collections.Generic;
using SLSUtilities.General;
using UnityEngine;
namespace Cielonos.MainGame
{
[Serializable]
public class RunState
{
// ----------------------------------------------------------------
// 随机数
// ----------------------------------------------------------------
/// <summary>本局的随机数管理器,所有子系统从此派生 RNG。</summary>
[NonSerialized]
public Randomizer randomizer;
// ----------------------------------------------------------------
// 地图与位置
// ----------------------------------------------------------------
public RunMapData mapData; // 本局生成的地图
public Vector2Int currentPosition; // 当前所在节点的网格坐标
public HashSet<Vector2Int> visitedNodes; // 已访问节点坐标集合
public HashSet<Vector2Int> exhaustedNodes; // 已用完的单次使用节点MedicalStation、MechanicalTable
public HashSet<Vector2Int> completedNodes; // 已完成的节点(战斗已清空、事件已完成等),防止重复结算
// ----------------------------------------------------------------
// 迷雾探测
// ----------------------------------------------------------------
/// <summary>
/// 探测半径BFS 步数)。默认 1表示只显示已访问节点周围1格的邻居。
/// 可通过装备/道具增加,扩大可视范围。
/// </summary>
public int scoutRange = 1;
/// <summary>
/// 被永久揭示的节点坐标集合。
/// 用于道具效果(如"揭示某个特定节点")。
/// </summary>
public HashSet<Vector2Int> permanentlyRevealedNodes;
/// <summary>
/// 被永久揭示的节点类型集合。
/// 用于道具效果(如"揭示地图上所有商店"、"揭示地图上所有医疗站")。
/// </summary>
public HashSet<MapNodeType> permanentlyRevealedTypes;
// ----------------------------------------------------------------
// 统计数据
// ----------------------------------------------------------------
public float elapsedTime; // 本局已用时间
public int roomsCleared; // 已清理房间数
public int enemiesDefeated; // 已击杀敌人数
public int hurtCount; // 实际扣除生命值的受伤次数(受击但被盾完全抵挡不计)
public bool isCompleted; // 是否通关
}
}