fixed a bug where Dungeon.buildDungeon would set map directions upside down
This commit is contained in:
parent
9753fa2931
commit
39a442ba14
@ -161,15 +161,15 @@ public class Dungeon {
|
||||
else
|
||||
dungeon[y][x].setAdajacentTile(null, Direction.EAST);
|
||||
|
||||
if (y+1 < height) // upwards Tile reference
|
||||
dungeon[y][x].setAdajacentTile(dungeon[y+1][x], Direction.NORTH);
|
||||
else
|
||||
dungeon[y][x].setAdajacentTile(null, Direction.NORTH);
|
||||
|
||||
if (y-1 >= 0) // downwards Tile reference
|
||||
dungeon[y][x].setAdajacentTile(dungeon[y-1][x], Direction.SOUTH);
|
||||
if (y+1 < height) // downwards Tile reference
|
||||
dungeon[y][x].setAdajacentTile(dungeon[y+1][x], Direction.SOUTH);
|
||||
else
|
||||
dungeon[y][x].setAdajacentTile(null, Direction.SOUTH);
|
||||
|
||||
if (y-1 >= 0) // upwards Tile reference
|
||||
dungeon[y][x].setAdajacentTile(dungeon[y-1][x], Direction.NORTH);
|
||||
else
|
||||
dungeon[y][x].setAdajacentTile(null, Direction.NORTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user