1
0
Fork 0

Correct wall texture next to doors

This commit is contained in:
Piegames 2018-04-24 22:05:17 +02:00
parent 8351f49f6d
commit 5094c9574c

View file

@ -221,6 +221,14 @@ public class DungeonGenerator {
for (int y = -TUNNEL_THICKNESS; y < TUNNEL_THICKNESS; y++) for (int y = -TUNNEL_THICKNESS; y < TUNNEL_THICKNESS; y++)
if (r.tiles.ContainsKey(v + new Vector2Int(x, y)) && r.tiles[v + new Vector2Int(x, y)].type == Room.TileType.ROCK) if (r.tiles.ContainsKey(v + new Vector2Int(x, y)) && r.tiles[v + new Vector2Int(x, y)].type == Room.TileType.ROCK)
r.tiles[v + new Vector2Int(x, y)].type = Room.TileType.GROUND; r.tiles[v + new Vector2Int(x, y)].type = Room.TileType.GROUND;
if (r.tiles.ContainsKey(v + new Vector2Int(0, 1)) && r.tiles[v + new Vector2Int(0, 1)].type == Room.TileType.WALL)
r.tiles.Remove(v + new Vector2Int(0, 1));
if (r.tiles.ContainsKey(v + new Vector2Int(0, -1)) && r.tiles[v + new Vector2Int(0, -1)].type == Room.TileType.WALL)
r.tiles.Remove(v + new Vector2Int(0, -1));
if (r.tiles.ContainsKey(v + new Vector2Int(1, 0)) && r.tiles[v + new Vector2Int(1, 0)].type == Room.TileType.WALL)
r.tiles.Remove(v + new Vector2Int(1, 0));
if (r.tiles.ContainsKey(v + new Vector2Int(-1, 0)) && r.tiles[v + new Vector2Int(-1, 0)].type == Room.TileType.WALL)
r.tiles.Remove(v + new Vector2Int(-1, 0));
} }
} }