private void InitialCellBehaviour() { allCells = tgs.cells; foreach (Cell cell in allCells) { int cellIndex = tgs.CellGetIndex(cell); //green = wood; if (tgs.CellGetTexture(cellIndex) == tgs.textures[1]) { tgs.CellSetCrossCost(cellIndex, 2); tgs.CellToggleRegionSurface(cellIndex, false, tgs.textures[1]); tgs.CellSetGroup(cellIndex, group1); } //apple = swamp else if (tgs.CellGetTexture(cellIndex) == tgs.textures[2]) { tgs.CellSetCrossCost(cellIndex, 4); tgs.CellToggleRegionSurface(cellIndex, false, tgs.textures[2]); tgs.CellSetGroup(cellIndex, group2); } //map = mountain else if (tgs.CellGetTexture(cellIndex) == tgs.textures[3]) { tgs.CellSetCanCross(cellIndex, false); tgs.CellToggleRegionSurface(cellIndex, false, tgs.textures[3]); } } }