public void Xmirror()
{
List<List<GameObject>> grids = GetGridData();
if(grids.Count%2 != 1)
{
Debug.LogWarning("The map is not symmetric about x axis, number of rows must be odd");
return;
}
int head = 0;
int tail = grids.Count-1;
while(head < tail){
for(int i=0;i<grids[head].Count;i++){
grids[tail][i].GetComponent<TnGAttribute>().MirrorTnGAttributesFrom(grids[head][i].GetComponent<TnGAttribute>());
}
head ++;
tail --;
}
UpdateGridMap();
}