备份CatanBuilding瘦身独立工程
This commit is contained in:
39
Assets/Scripts/HexGrid/Data/HexTile.cs
Normal file
39
Assets/Scripts/HexGrid/Data/HexTile.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
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}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user