Added Map01, Map02
New Area (big hall)
This commit is contained in:
@@ -7,6 +7,8 @@ import main.entities.Spider;
|
|||||||
import main.maps.Corridor;
|
import main.maps.Corridor;
|
||||||
import main.entities.player.Player;
|
import main.entities.player.Player;
|
||||||
import main.maps.Map;
|
import main.maps.Map;
|
||||||
|
import main.maps.Map01;
|
||||||
|
import main.maps.Map02;
|
||||||
import main.maps.TestMap;
|
import main.maps.TestMap;
|
||||||
import main.maps.TutorialMap;
|
import main.maps.TutorialMap;
|
||||||
|
|
||||||
@@ -15,7 +17,7 @@ import main.maps.TutorialMap;
|
|||||||
*/
|
*/
|
||||||
public class World extends Knoten {
|
public class World extends Knoten {
|
||||||
|
|
||||||
public static final int SCALE_FACTOR = 6; // Der Basis Zoomfaktor
|
public static final int SCALE_FACTOR = 4; // Der Basis Zoomfaktor
|
||||||
public static final int SCALE = SCALE_FACTOR * Tile.getSize(); // Eine Gameunit ist so viele pixel lang
|
public static final int SCALE = SCALE_FACTOR * Tile.getSize(); // Eine Gameunit ist so viele pixel lang
|
||||||
|
|
||||||
private Map currentMap; // Die Map die aktuell angezeigt werden soll.
|
private Map currentMap; // Die Map die aktuell angezeigt werden soll.
|
||||||
|
|||||||
25
Zoelda/src/main/maps/Map01.java
Normal file
25
Zoelda/src/main/maps/Map01.java
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
package main.maps;
|
||||||
|
|
||||||
|
import main.Tile;
|
||||||
|
|
||||||
|
public class Map01 extends Map {
|
||||||
|
|
||||||
|
public Map01 () {
|
||||||
|
super (15,11);
|
||||||
|
for (int x = 0; x < map.length; x++) {
|
||||||
|
for (int y = 0; y < map[0].length; y++) {
|
||||||
|
//Wand
|
||||||
|
if((x == 4 || y == 9 || x == 10) && x > 3 && y > 0 && x < 11 && y < 10 && x != 7 ) {
|
||||||
|
map[x][y] = new Tile(3, x, y);
|
||||||
|
add(map[x][y]);
|
||||||
|
}
|
||||||
|
//Boden
|
||||||
|
else if(x > 3 && y > 0 && x < 11 && y < 10) {
|
||||||
|
map[x][y] = new Tile(5, x, y);
|
||||||
|
add(map[x][y]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
38
Zoelda/src/main/maps/Map02.java
Normal file
38
Zoelda/src/main/maps/Map02.java
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
package main.maps;
|
||||||
|
|
||||||
|
import main.Tile;
|
||||||
|
|
||||||
|
public class Map02 extends Map {
|
||||||
|
|
||||||
|
public Map02() {
|
||||||
|
super(15, 11);
|
||||||
|
|
||||||
|
for (int x = 0; x < map.length; x++) {
|
||||||
|
for (int y = 0; y < map[0].length; y++) {
|
||||||
|
// Wand
|
||||||
|
if (y == 0 || x == 0 || y == 10 || x == 14) {
|
||||||
|
// Übergang, Tür
|
||||||
|
if (y == 10) {
|
||||||
|
if (x > 4 && x < 10) {
|
||||||
|
map[x][y] = new Tile(5, x, y);
|
||||||
|
add(map[x][y]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
map[x][y] = new Tile(3, x, y);
|
||||||
|
add(map[x][y]);
|
||||||
|
}
|
||||||
|
// 3D-Wand
|
||||||
|
else if(y == 1 ) {
|
||||||
|
map[x][y] = new Tile(4, x, y);
|
||||||
|
add(map[x][y]);
|
||||||
|
}
|
||||||
|
// Steinboden
|
||||||
|
else {
|
||||||
|
map[x][y] = new Tile(5, x, y);
|
||||||
|
add(map[x][y]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user