示例#1
0
 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);
            }
        }
示例#3
0
 public static void OccupyTiles(BuildGridArea area, TileOccupant occupantType)
 {
     OccupyTiles(area.MinX, area.MinZ, area.Size, occupantType);
 }
示例#4
0
 public static void OccupyTile(int x, int z, TileOccupant occupantType)
 {
     occupiedTiles.Add(new BuildGridReference(x, z), occupantType);
 }