Files
2026-05-26 16:15:54 +08:00

39 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;
using UnityEngine.Serialization;
// 应该移动到Data 中去
namespace HexGrid
{
public enum TileType
{
None,
Grass,
Road,
Water
}
[System.Serializable]
public class HexTile
{
//可变的值
//0 未激活 1 可建造 2 已经建造完成
public int tileStatus;
// 固定的值
public int id; // 记录地块的Id,取代字符串,引入HexMath 的时候使用
public int zoneId; // 保留 一下zoneId,可以快速找到zone
public int subZoneIndex; // 子区域的索引
public string zoneName;
public string tileOriName; // 块的原始名,
public string tileId; // 考虑是坐标合并x_y tile_0_0
public SerializableVector2Int tileCoords; // 在 Chunk 内的坐标
public TileType type;
public GameObject visual;
public override string ToString()
{
return $"{tileId} -> {tileCoords} {type} -> tileStatus:{tileStatus}";
}
}
}