Esempio n. 1
0
 private void CreateWalls(List <Vector3Int> tunnelTiles)
 {
     foreach (Vector3Int tile in tunnelTiles)
     {
         foreach (Vector3Int surrTile in VectorOperations.GetSurroundingTiles(tile))
         {
             if (!tiles.GetIndoorTiles().Contains(mapOperations.GetGroundTile(surrTile)))
             {
                 map.structures.SetTile(surrTile, tiles.GetStructureTile());
             }
         }
     }
 }
Esempio n. 2
0
    /// <summary>
    /// Deprecated
    /// </summary>
    /// <param name="tile"></param>
    /// <param name="tileset"></param>
    /// <returns></returns>
    public bool IsCorner(Vector3Int tile, Tileset tileset)
    {
        List <Vector3Int> list = VectorOperations.GetSurroundingTiles(tile);
        int corners            = 0;

        if (tileset.GetIndoorTiles().Contains(gameMap.ground.GetTile(list[1])))
        {
            corners++;
        }
        if (tileset.GetIndoorTiles().Contains(gameMap.ground.GetTile(list[3])))
        {
            corners++;
        }
        if (tileset.GetIndoorTiles().Contains(gameMap.ground.GetTile(list[5])))
        {
            corners++;
        }
        if (tileset.GetIndoorTiles().Contains(gameMap.ground.GetTile(list[7])))
        {
            corners++;
        }
        return(corners == 1);
    }