void EditCell(HexCell_Script cell) { if (cell) { //if (applyColor) // cell.Color = activeColor; if (activeTerrainTypeIndex >= 0) { cell.TerrainTypeIndex = activeTerrainTypeIndex; } if (applyElevation) { cell.Elevation = activeElevation; } if (applyWaterLevel) { cell.WaterLevel = activeWaterLevel; } if (applySpecialIndex) { cell.SpecialIndex = activeSpecialIndex; } if (applyUrbanLevel) { cell.UrbanLevel = activeUrbanLevel; } if (applyFarmLevel) { cell.FarmLevel = activeFarmLevel; } if (applyPlantLevel) { cell.PlantLevel = activePlantLevel; } if (riverMode == OptionalToggle.No) { cell.RemoverRiver(); } if (roadMode == OptionalToggle.No) { cell.RemoveRoads(); } if (isDrag) { HexCell_Script otherCell = cell.GetNeighbor(dragDirection.Opposite()); if (otherCell) { if (riverMode == OptionalToggle.Yes) { otherCell.SetOutgoingRiver(dragDirection); } if (walledMode != OptionalToggle.Ignore) { cell.Walled = walledMode == OptionalToggle.Yes; } if (roadMode == OptionalToggle.Yes) { otherCell.AddRoad(dragDirection); } } } //else if (isDrag && riverMode == OptionalToggle.Yes) //{ // HexCell_Script otherCell = cell.GetNeighbor(dragDirection.Opposite()); // if (otherCell) // otherCell.SetOutgoingRiver(dragDirection); //} } }