private void BuildNodes()
{
float xPos;
float zPos;
float txPos;
float tyPos;
for (int x=0; x<size_x; x++) {
for (int y=0; y<size_y; y++) {
xPos = left.x + (x * objectManager.MapData.NodeSize.x * (objectManager.MapData.IsIsoGrid?.5f:1f));
zPos = right.y + ((y + 1) * objectManager.MapData.NodeSize.y) + (objectManager.MapData.IsIsoGrid?((x%2==1)?objectManager.MapData.NodeSize.y/2f:0f):0f);
txPos = (x * objectManager.MapData.NodeSize.x * (objectManager.MapData.IsIsoGrid?.5f:1f));
tyPos = ((y + 1) * objectManager.MapData.NodeSize.y) + (objectManager.MapData.IsIsoGrid?((x%2==1)?objectManager.MapData.NodeSize.y/2f:0f):0f);
Vector3 position = new Vector3 (xPos + objectManager.MapData.NodeSize.x / 2f, 0, zPos - objectManager.MapData.NodeSize.y / 2f);
nodes [x, y].listIndexX = x;
nodes [x, y].listIndexY = y;
nodes [x, y].UnityPosition = position;
nodes [x, y].texturePosX = (int)(objectManager.MapData.NodeSize.x/2f + txPos);
nodes [x, y].texturePosY = (int)(tyPos - objectManager.MapData.NodeSize.y / 2f);
}
}
}