public ChunkDataEntry GetChunk(ChunkDataType type) { for (int i = 0; i < SubData.Count; i++) { if (SubData[i].ChunkType == type) { return(SubData[i]); } } return(null); }
private bool SetPositionProperty(Vector3Int globalPosition, string name, ChunkDataType dataType, object positionProperty) { if (positionProperty != null) { Vector3Int localPosition = TileToLocalChunkPosition(globalPosition); ChunkDataKey positionKey; positionKey.position = localPosition; positionKey.name = name; ChunkDataValue positionValue; positionValue.type = dataType; positionValue.data = positionProperty; positionProperties[positionKey] = positionValue; return(true); } return(false); }