public void AddLayers (int count) {
int newLayerCount = layerCount + count;
if (newLayerCount > LevelGridNode.MaxLayerCount) {
Debug.LogError ("Too many layers, a maximum of LevelGridNode.MaxLayerCount are allowed (required "+newLayerCount+")");
return;
}
LevelGridNode[] tmp = nodes;
nodes = new LevelGridNode[width*depth*newLayerCount];
for (int i=0;i<tmp.Length;i++) nodes[i] = tmp[i];
layerCount = newLayerCount;
}