Zwischenstand

master
Jonathan Hager 6 years ago
parent 138bb33bd7
commit c206b30815

@ -114,9 +114,9 @@ public class DungeonGenerator {
Level temp = d.getLevel()[i];
System.out.println("Level " + i);
for(int j = 0; j < temp.getRooms().length; j++){
for(int j = temp.getRooms().length - 1; j >=0; j--){
for(int k = 0; k < temp.getRooms().length; k++){
for(int k = temp.getRooms().length - 1; k >= 0; k--){
if(temp.getRooms()[j][k] == null){
System.out.print("0 ");
}

@ -63,8 +63,8 @@ public class MapGenerator {
temp.getCell((tempX / 2) + 1, tempY + 1).setTile(new StaticTiledMapTile(splitTiles[0][3])); //oben
}
// Ausgang rechts
if(x > 0 && l.getRooms()[x - 1][y] != null){
// Ausgang rechts
if(x < l.getRooms().length - 1 && l.getRooms()[x + 1][y] != null){
temp.getCell(tempX + 1, (tempY / 2) + 1).setTile(new StaticTiledMapTile(splitTiles[0][3])); //rechts
}
@ -74,7 +74,7 @@ public class MapGenerator {
}
// Ausgang links
if(x < l.getRooms().length - 1 && l.getRooms()[x + 1][y] != null){
if(x > 0 && l.getRooms()[x - 1][y] != null){
temp.getCell(0, (tempY / 2) + 1).setTile(new StaticTiledMapTile(splitTiles[0][3])); //links
}

Loading…
Cancel
Save