diff --git a/Zoelda/src/main/Tile.java b/Zoelda/src/main/Tile.java index 87f8fe5..5088864 100644 --- a/Zoelda/src/main/Tile.java +++ b/Zoelda/src/main/Tile.java @@ -26,6 +26,9 @@ public class Tile extends Knoten { public static final int DOOR_LEFT_BOTTOM = 7; public static final int DOOR_LEFT_TOP = 8; public static final int DISCO = 9; + public static final int DOOR_RIGHT_BOTTOM = 10; + public static final int DOOR_TOP = 11; + public static final int DOOR_BOTTOM = 12; private Bild img; // Bild, das gerendert wird private int id; // Die id dises Tiles// @@ -51,17 +54,17 @@ public class Tile extends Knoten { if (id != VOID) { img = images[id].clone(); img.positionSetzen(posX * World.SCALE, posY * World.SCALE); - // Bild zu EA hinzufügen. + // Bild zu EA hinzuf�gen. add(img); } } private static void loadImages() { - images = new Bild[9]; + images = new Bild[12]; for (int i = 0; i < images.length; i++) { try { BufferedImage buff = ImageIO.read(Tile.class.getResourceAsStream(getPathFromId(i))); - // Gras hat 8 verschiedene Texturen von denen eine zufällig ausgewählt werden + // Gras hat 8 verschiedene Texturen von denen eine zuf�llig ausgew�hlt werden // muss. if (i == GRASS) { buff = buff.getSubimage(16 * (int) (Math.random() * 8), 0, 16, 16); @@ -77,7 +80,7 @@ public class Tile extends Knoten { } /** - * @return den Pfad der zu der Id gehört. + * @return den Pfad der zu der Id geh�rt. */ private static String getPathFromId(int id) { switch (id) { @@ -101,12 +104,19 @@ public class Tile extends Knoten { return "/res/images/tiles/door_left_top.png"; case DISCO: return "/res/images/tiles/disco_sprite_sheet.png"; + return "/res/images/tiles/door_left.png"; + case DOOR_RIGHT_BOTTOM: + return "/res/images/tiles/door_right_bottom.png"; + case DOOR_TOP: + return "/res/images/tiles/door_right.png"; + case DOOR_BOTTOM: + return "/res/images/tiles/door_bottom.png"; } return null; } /** - * @return die Größe der Textur + * @return die Gr��e der Textur */ private static int getSize() { return 16; @@ -116,34 +126,34 @@ public class Tile extends Knoten { * @return ob man durch das Tile durchgehen kann */ public boolean isCollidable() { - // Alle Tiles durch die man nicht laufen soll müssen hier true zurückgeben, - // sonst werden sie bei der Collisiondetection nicht berücksichtigt. + // Alle Tiles durch die man nicht laufen soll m�ssen hier true zur�ckgeben, + // sonst werden sie bei der Collisiondetection nicht ber�cksichtigt. return id == WALL_TOP || id == STONE_WALL; } /** - * Kleine Hifsmethode un die koordinate der Top-Kante rurückzugenben. + * Kleine Hifsmethode un die koordinate der Top-Kante rur�ckzugenben. */ public int getTop() { return positionY(); } /** - * Kleine Hifsmethode un die koordinate der Bottom-Kante rurückzugenben. + * Kleine Hifsmethode un die koordinate der Bottom-Kante rur�ckzugenben. */ public int getBottom() { return positionY() + getSize(); } /** - * Kleine Hifsmethode un die koordinate der Left-Kante rurückzugenben. + * Kleine Hifsmethode un die koordinate der Left-Kante rur�ckzugenben. */ public int getLeft() { return positionX(); } /** - * Kleine Hifsmethode un die koordinate der Right-Kante rurückzugenben. + * Kleine Hifsmethode un die koordinate der Right-Kante rur�ckzugenben. */ public int getRight() { return positionX() + getSize(); diff --git a/Zoelda/src/res/images/maps/map1a.png~ b/Zoelda/src/res/images/maps/map1a.png~ deleted file mode 100644 index 8ddc8f1..0000000 Binary files a/Zoelda/src/res/images/maps/map1a.png~ and /dev/null differ diff --git a/Zoelda/src/res/images/tiles/.stone_wall_bottom.png-autosave.kra b/Zoelda/src/res/images/tiles/.stone_wall_bottom.png-autosave.kra deleted file mode 100644 index 570d716..0000000 Binary files a/Zoelda/src/res/images/tiles/.stone_wall_bottom.png-autosave.kra and /dev/null differ diff --git a/Zoelda/src/res/images/tiles/door_bottom.png b/Zoelda/src/res/images/tiles/door_bottom.png new file mode 100644 index 0000000..7a55fda Binary files /dev/null and b/Zoelda/src/res/images/tiles/door_bottom.png differ diff --git a/Zoelda/src/res/images/tiles/door_left1.png b/Zoelda/src/res/images/tiles/door_left1.png new file mode 100644 index 0000000..d9d495b Binary files /dev/null and b/Zoelda/src/res/images/tiles/door_left1.png differ diff --git a/Zoelda/src/res/images/tiles/door_left_bottom1.png b/Zoelda/src/res/images/tiles/door_left_bottom1.png new file mode 100644 index 0000000..2e75920 Binary files /dev/null and b/Zoelda/src/res/images/tiles/door_left_bottom1.png differ diff --git a/Zoelda/src/res/images/tiles/door_right_bottom.png b/Zoelda/src/res/images/tiles/door_right_bottom.png new file mode 100644 index 0000000..f368859 Binary files /dev/null and b/Zoelda/src/res/images/tiles/door_right_bottom.png differ