added tutorial map, comments ger -> eng
This commit is contained in:
@@ -8,6 +8,7 @@ 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.TestMap;
|
import main.maps.TestMap;
|
||||||
|
import main.maps.TutorialMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hier werden alle Maps gespeichert.
|
* Hier werden alle Maps gespeichert.
|
||||||
@@ -22,7 +23,7 @@ public class World extends Knoten {
|
|||||||
public World() {
|
public World() {
|
||||||
|
|
||||||
// Map initialisieren
|
// Map initialisieren
|
||||||
currentMap = new TestMap();
|
currentMap = new TutorialMap();
|
||||||
// Map zu EA hinzuf<75>gen
|
// Map zu EA hinzuf<75>gen
|
||||||
add(currentMap);
|
add(currentMap);
|
||||||
|
|
||||||
|
|||||||
@@ -11,13 +11,17 @@ public class Corridor extends Map {
|
|||||||
|
|
||||||
for (int x = 0; x < map.length; x++) {
|
for (int x = 0; x < map.length; x++) {
|
||||||
for (int y = 0; y < map[0].length; y++) {
|
for (int y = 0; y < map[0].length; y++) {
|
||||||
|
//Wand
|
||||||
if((y == 0 || x == 0 || y == 9 || x == 4) && x != 2 ) {
|
if((y == 0 || x == 0 || y == 9 || x == 4) && x != 2 ) {
|
||||||
map[x][y] = new Tile(3, x, y);
|
map[x][y] = new Tile(3, x, y);
|
||||||
add(map[x][y]);
|
add(map[x][y]);
|
||||||
} else if(y == 1 && (x != 0 || x != 4)&& x != 2 ) {
|
}
|
||||||
|
//3D-Wand
|
||||||
|
else if(y == 1 && (x != 0 || x != 4)&& x != 2 ) {
|
||||||
map[x][y] = new Tile(4, x, y);
|
map[x][y] = new Tile(4, x, y);
|
||||||
add(map[x][y]);
|
add(map[x][y]);
|
||||||
}
|
}
|
||||||
|
//Steinboden
|
||||||
else {
|
else {
|
||||||
map[x][y] = new Tile(5, x, y);
|
map[x][y] = new Tile(5, x, y);
|
||||||
add(map[x][y]);
|
add(map[x][y]);
|
||||||
|
|||||||
29
Zoelda/src/main/maps/TutorialMap.java
Normal file
29
Zoelda/src/main/maps/TutorialMap.java
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
package main.maps;
|
||||||
|
|
||||||
|
import main.Tile;
|
||||||
|
|
||||||
|
public class TutorialMap extends Map {
|
||||||
|
|
||||||
|
public TutorialMap() {
|
||||||
|
super(15, 11);
|
||||||
|
for (int x = 0; x < map.length; x++) {
|
||||||
|
for (int y = 0; y < map[0].length; y++) {
|
||||||
|
//Wand, Sichtschutz
|
||||||
|
if (y == 0 ||y == map[0].length - 1 || x == 0 || x == map.length - 1 || ((y == 4|| y == 5) && x == 10 )) {
|
||||||
|
map[x][y] = new Tile (1, x, y);
|
||||||
|
add(map [x][y]);
|
||||||
|
}
|
||||||
|
//3D-Wand, 3F-Sichtschutz
|
||||||
|
else if(y == 1 || ( y == 6 && x == 10)) {
|
||||||
|
map[x][y] = new Tile (2, x, y);
|
||||||
|
add(map [x][y]);
|
||||||
|
}
|
||||||
|
//Grasboden
|
||||||
|
else{
|
||||||
|
map[x][y] = new Tile(0, x, y);
|
||||||
|
add(map[x][y]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user