public static void OccupyTiles(int x, int z, int size, TileOccupant occupantType) { foreach (BuildGridReference gr in Utilities.GetGridReferences(x, z, size)) { occupiedTiles.Remove(gr); occupiedTiles.Add(gr, occupantType); } }
void CreateExpansionEntry(BuildGridReference gridRef) { TileOccupant tileOccupantAtGridRef = BuildGridManager.GetOccupantAtLocation(gridRef); // add if anything but a city building, as could destroy a power plant, freeing up space. Will check can place at point of spawn. if (tileOccupantAtGridRef != TileOccupant.CityBuilding) { expansionAreas.Add(gridRef); } }
public static void OccupyTiles(BuildGridArea area, TileOccupant occupantType) { OccupyTiles(area.MinX, area.MinZ, area.Size, occupantType); }
public static void OccupyTile(int x, int z, TileOccupant occupantType) { occupiedTiles.Add(new BuildGridReference(x, z), occupantType); }