Rock Wall Fix
This commit is contained in:
parent
1199d14774
commit
60c6ff317b
1 changed files with 5 additions and 5 deletions
|
@ -106,7 +106,7 @@ public class GenerationProcessor {
|
|||
}
|
||||
|
||||
private ExtendedTileType getCorrectWallType(Dictionary<Vector2Int, GenTile> tiles, Vector2Int position){
|
||||
int groundNumber = CountSpecificNeighbours(tiles, position, Room.TileType.GROUND);
|
||||
int groundNumber = CountSpecificNeighbours(tiles, position, Room.TileType.GROUND) + CountSpecificNeighbours(tiles, position, Room.TileType.ROCK);
|
||||
switch(groundNumber){
|
||||
case 0:
|
||||
return ExtendedTileType.BorderInner;
|
||||
|
@ -118,14 +118,14 @@ public class GenerationProcessor {
|
|||
}
|
||||
|
||||
private ExtendedTileType getCorrectRockType(Dictionary<Vector2Int, GenTile> tiles, Vector2Int position){
|
||||
|
||||
|
||||
ExtendedTileType type = ExtendedTileType.Rock;
|
||||
|
||||
bool left = false;
|
||||
bool top = false;
|
||||
bool right = false;
|
||||
bool bottom = false;
|
||||
|
||||
|
||||
Vector2Int toCheck = position + new Vector2Int(0, -1);
|
||||
if (tiles.ContainsKey(toCheck) && tiles[toCheck].type == Room.TileType.ROCK)
|
||||
bottom = true;
|
||||
|
@ -178,7 +178,7 @@ public class GenerationProcessor {
|
|||
if (right && bottom && !top && !left)
|
||||
{
|
||||
return ExtendedTileType.RockRD;
|
||||
}
|
||||
}
|
||||
if (left && top && bottom && !right)
|
||||
{
|
||||
return ExtendedTileType.RockLUD;
|
||||
|
@ -201,4 +201,4 @@ public class GenerationProcessor {
|
|||
}
|
||||
return type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue