changed doors
This commit is contained in:
parent
5d2555b91b
commit
beedda8b62
@ -8,21 +8,45 @@ import java.awt.*;
|
|||||||
public class Block extends Cell {
|
public class Block extends Cell {
|
||||||
private ImageCell imageCell;
|
private ImageCell imageCell;
|
||||||
private boolean paint;
|
private boolean paint;
|
||||||
|
private String partial;
|
||||||
|
|
||||||
public Block(int x, int y, ImageCell imageCell, boolean paint) {
|
public Block(int x, int y, ImageCell imageCell, boolean paint) {
|
||||||
super(x, y, WindowOfFreeMove.CELL_SIZE, Color.BLUE);
|
super(x, y, WindowOfFreeMove.CELL_SIZE, Color.BLUE);
|
||||||
this.imageCell = imageCell;
|
this.imageCell = imageCell;
|
||||||
this.paint = paint;
|
this.paint = paint;
|
||||||
|
this.partial = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public Block(int x, int y, ImageCell imageCell, String partial, boolean paint) {
|
||||||
|
super(x, y, WindowOfFreeMove.CELL_SIZE, Color.BLUE);
|
||||||
|
this.imageCell = imageCell;
|
||||||
|
this.partial = partial;
|
||||||
|
this.paint = paint;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInBlock(int x, int y) {
|
public boolean isInBlock(int x, int y) {
|
||||||
return (this.getX() == x) && (this.getY() == y);
|
return (this.getX() == x) && (this.getY() == y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isInBlock(int x, int y, boolean half) {
|
||||||
|
return (this.getX() == x) && (this.getY() == y) && !(partial.equals("d"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPartial() {
|
||||||
|
return !(partial.equals(""));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void paint(Graphics2D g) {
|
public void paint(Graphics2D g) {
|
||||||
super.paint(g);
|
super.paint(g);
|
||||||
if (paint)
|
if (paint)
|
||||||
|
if (partial.equals("u"))
|
||||||
|
g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("BLOCK")), getX() * getSize(),
|
||||||
|
getY() * getSize() - (getSize() / 2), getSize(), getSize(), null);
|
||||||
|
else if (partial.equals("d"))
|
||||||
|
g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("BLOCK")), getX() * getSize(),
|
||||||
|
getY() * getSize() + (getSize() / 2), getSize(), getSize(), null);
|
||||||
|
else
|
||||||
g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("BLOCK")), getX() * getSize(),
|
g.drawImage(imageCell.getImagesOfTiles().get(imageCell.getImageFromCellMap("BLOCK")), getX() * getSize(),
|
||||||
getY() * getSize(), getSize(), getSize(), null);
|
getY() * getSize(), getSize(), getSize(), null);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package ruscz.game.gameOfProd.Cells;
|
|||||||
|
|
||||||
import ruscz.game.gameOfProd.Dialog.Dialog;
|
import ruscz.game.gameOfProd.Dialog.Dialog;
|
||||||
import ruscz.game.gameOfProd.Image.ImageCell;
|
import ruscz.game.gameOfProd.Image.ImageCell;
|
||||||
|
import ruscz.game.gameOfProd.Image.ImageDoor;
|
||||||
import ruscz.game.gameOfProd.Windows.WindowOfFreeMove;
|
import ruscz.game.gameOfProd.Windows.WindowOfFreeMove;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
@ -10,25 +11,29 @@ public class DoorCell extends InteractionCell {
|
|||||||
private boolean isOpen;
|
private boolean isOpen;
|
||||||
private boolean isLocked;
|
private boolean isLocked;
|
||||||
private boolean requiresKey;
|
private boolean requiresKey;
|
||||||
|
private boolean directionVert;
|
||||||
|
|
||||||
public DoorCell(int x, int y, String message, Dialog dialog, ImageCell imageCell, WindowOfFreeMove window, boolean requiresKey) {
|
public DoorCell(int x, int y, boolean directionVert, String message, Dialog dialog, ImageCell imageCell, WindowOfFreeMove window, boolean requiresKey) {
|
||||||
super(x, y, message, dialog, imageCell, window, true);
|
super(x, y, message, dialog, imageCell, window, true);
|
||||||
this.isOpen = false;
|
this.isOpen = false;
|
||||||
this.isLocked = true;
|
this.isLocked = true;
|
||||||
this.requiresKey = requiresKey;
|
this.requiresKey = requiresKey;
|
||||||
|
this.directionVert = directionVert;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DoorCell(int x, int y, ImageCell imageCell, WindowOfFreeMove window) {
|
public DoorCell(int x, int y, boolean directionVert, ImageCell imageCell, WindowOfFreeMove window) {
|
||||||
super(x, y, null, null, imageCell, window, true);
|
super(x, y, null, null, imageCell, window, true);
|
||||||
this.isOpen = false;
|
this.isOpen = false;
|
||||||
this.isLocked = false;
|
this.isLocked = false;
|
||||||
|
this.directionVert = directionVert;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void paint(Graphics2D g) {
|
public void paint(Graphics2D g) {
|
||||||
int open = isOpen ? 1 : 0;
|
int open = isOpen ? 1 : 0;
|
||||||
g.drawImage(super.getImageCell().getImagesOfTiles().get(super.getImageCell().getImageFromCellMap("DOOR") + open), getX() * getSize(),
|
int direction = directionVert ? 0 : 2;
|
||||||
getY() * getSize(), getSize(), getSize(), null);
|
g.drawImage(super.getImageCell().getImageDoor().getImagesOfDoor()[open + direction], (getX() - 1) * getSize(),
|
||||||
|
(getY() - 1) * getSize(), getSize() * 2, getSize() * 2, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOpen() {
|
public boolean isOpen() {
|
||||||
|
|||||||
@ -114,10 +114,10 @@ public class Person extends Cell {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (directionMove != WindowOfFreeMove.KEY_EVENT) {
|
if (directionMove != WindowOfFreeMove.KEY_EVENT) {
|
||||||
if (directionMove != 0 && !map.isBusyCell(x, y) && !map.isInteractionCell(x, y) && !map.isClosedDoor(x, y)) {
|
if (directionMove != 0 && !map.isBusyCell(x, y, true) && !map.isInteractionCell(x, y) && !map.isClosedDoor(x, y)) {
|
||||||
directionMoveLast = directionMove;
|
directionMoveLast = directionMove;
|
||||||
isMoving = true;
|
isMoving = true;
|
||||||
} else if (directionMove != 0 && map.isBusyCell(x, y)) {
|
} else if (directionMove != 0 && map.isBusyCell(x, y, true)) {
|
||||||
directionMoveLast = 0;
|
directionMoveLast = 0;
|
||||||
} else if (directionMove != 0 && map.isInteractionCell(x, y)) {
|
} else if (directionMove != 0 && map.isInteractionCell(x, y)) {
|
||||||
directionMoveLast = 0;
|
directionMoveLast = 0;
|
||||||
@ -131,7 +131,7 @@ public class Person extends Cell {
|
|||||||
map.findEventByXY(x, y).moveToMap();
|
map.findEventByXY(x, y).moveToMap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!map.isInteractionCell(x, y) && !map.isBusyCell(x, y) && !map.isClosedDoor(x, y)) {
|
if (!map.isInteractionCell(x, y) && !map.isBusyCell(x, y, true) && !map.isClosedDoor(x, y)) {
|
||||||
set(x, y);
|
set(x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,6 +17,7 @@ public class ImageCell {
|
|||||||
private static BufferedImage image;
|
private static BufferedImage image;
|
||||||
private LinkedList<BufferedImage> imagesOfTiles;
|
private LinkedList<BufferedImage> imagesOfTiles;
|
||||||
private HashMap<String, Integer> cellMap;
|
private HashMap<String, Integer> cellMap;
|
||||||
|
private ImageDoor imageDoor;
|
||||||
private int[][] mapBackground;
|
private int[][] mapBackground;
|
||||||
private int[][] mapForeground;
|
private int[][] mapForeground;
|
||||||
|
|
||||||
@ -106,6 +107,19 @@ public class ImageCell {
|
|||||||
while (scanner.hasNextLine()) {
|
while (scanner.hasNextLine()) {
|
||||||
String data = scanner.nextLine();
|
String data = scanner.nextLine();
|
||||||
String[] cellInfo = data.split(" ");
|
String[] cellInfo = data.split(" ");
|
||||||
|
if (cellInfo[0].equals("DOOR")) {
|
||||||
|
Rectangle[] rec = new Rectangle[12];
|
||||||
|
int CELL_SIZE = WindowOfFreeMove.CELL_SIZE;
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < rec.length / 4; i++) {
|
||||||
|
for (int j = 0; j < rec.length / 3; j++) {
|
||||||
|
rec[count] = new Rectangle(CELL_SIZE * i, CELL_SIZE * j, CELL_SIZE, CELL_SIZE);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
imageDoor = new ImageDoor(cellInfo[1], rec);
|
||||||
|
}
|
||||||
|
else
|
||||||
cellMap.put(cellInfo[0], Integer.parseInt(cellInfo[1]));
|
cellMap.put(cellInfo[0], Integer.parseInt(cellInfo[1]));
|
||||||
}
|
}
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
@ -121,6 +135,8 @@ public class ImageCell {
|
|||||||
return imagesOfTiles;
|
return imagesOfTiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ImageDoor getImageDoor() { return imageDoor; }
|
||||||
|
|
||||||
public void paintBackground(Graphics g, int x, int y) {
|
public void paintBackground(Graphics g, int x, int y) {
|
||||||
g.drawImage(imagesOfTiles.get(mapBackground[x][y]), x * WindowOfFreeMove.CELL_SIZE,
|
g.drawImage(imagesOfTiles.get(mapBackground[x][y]), x * WindowOfFreeMove.CELL_SIZE,
|
||||||
y * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null);
|
y * WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, WindowOfFreeMove.CELL_SIZE, null);
|
||||||
|
|||||||
42
src/main/java/ruscz/game/gameOfProd/Image/ImageDoor.java
Normal file
42
src/main/java/ruscz/game/gameOfProd/Image/ImageDoor.java
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
package ruscz.game.gameOfProd.Image;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
|
import java.awt.*;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public class ImageDoor {
|
||||||
|
private BufferedImage image;
|
||||||
|
private BufferedImage[] imagesOfDoor;
|
||||||
|
private int size;
|
||||||
|
|
||||||
|
public void setAllImagesOfDoor(Rectangle[] rectangles){
|
||||||
|
imagesOfDoor = new BufferedImage[4];
|
||||||
|
|
||||||
|
if (rectangles.length < 4)
|
||||||
|
throw new IllegalArgumentException();
|
||||||
|
|
||||||
|
for (int j = 0; j < 4; j++) {
|
||||||
|
BufferedImage img = image.getSubimage(0, size * j * 2, size * 2, size * 2);
|
||||||
|
imagesOfDoor[j] = img;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImageDoor(String door, Rectangle[] rectangles) {
|
||||||
|
try {
|
||||||
|
String[] doorInfo = door.split(",");
|
||||||
|
image = ImageIO.read(new File("src/main/resources/" + doorInfo[0]));
|
||||||
|
size = Integer.parseInt(doorInfo[1]);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
setAllImagesOfDoor(rectangles);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public BufferedImage[] getImagesOfDoor() {
|
||||||
|
return imagesOfDoor;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -25,7 +25,6 @@ public class ImagePerson {
|
|||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
for (int j = 0; j < 4; j++) {
|
for (int j = 0; j < 4; j++) {
|
||||||
BufferedImage img = image.getSubimage(subimageWidth * i, subimageHeight * j, subimageWidth, subimageHeight);
|
BufferedImage img = image.getSubimage(subimageWidth * i, subimageHeight * j, subimageWidth, subimageHeight);
|
||||||
// imagesOfDirection[count] = resize(img);
|
|
||||||
imagesOfDirection[count] = img;
|
imagesOfDirection[count] = img;
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,13 +79,20 @@ public class Map {
|
|||||||
String[] line = data.split(" ");
|
String[] line = data.split(" ");
|
||||||
for (int x = 0; x < Integer.parseInt(size[0]); x++) {
|
for (int x = 0; x < Integer.parseInt(size[0]); x++) {
|
||||||
TypeOfCell cellType;
|
TypeOfCell cellType;
|
||||||
if (line[x].equals("BLOCK") || line[x].equals("block")) {
|
if (line[x].contains("BLOCK") || line[x].equals("block")) {
|
||||||
cellType = TypeOfCell.BLOCK;
|
cellType = TypeOfCell.BLOCK;
|
||||||
map.getMapArray()[x][y] = cellType;
|
map.getMapArray()[x][y] = cellType;
|
||||||
if (line[x].equals("BLOCK"))
|
String[] block = line[x].split(",");
|
||||||
|
if (block[0].equals("BLOCK"))
|
||||||
|
if (block.length == 2) {
|
||||||
|
map.getBlocks().add(new Block(x, y, map.getImageCell(), block[1], true));
|
||||||
|
}
|
||||||
|
else {
|
||||||
map.getBlocks().add(new Block(x, y, map.getImageCell(), true));
|
map.getBlocks().add(new Block(x, y, map.getImageCell(), true));
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
map.getBlocks().add(new Block(x, y, map.getImageCell(), false));
|
map.getBlocks().add(new Block(x, y, map.getImageCell(), false));
|
||||||
|
}
|
||||||
} else if (line[x].equals("EMPTY")) {
|
} else if (line[x].equals("EMPTY")) {
|
||||||
cellType = TypeOfCell.EMPTY;
|
cellType = TypeOfCell.EMPTY;
|
||||||
map.getMapArray()[x][y] = cellType;
|
map.getMapArray()[x][y] = cellType;
|
||||||
@ -102,10 +109,10 @@ public class Map {
|
|||||||
map.setSpawnPoint(x, y);
|
map.setSpawnPoint(x, y);
|
||||||
} else if (line[x].contains("DOOR") && !line[x].contains("DOORTO")) {
|
} else if (line[x].contains("DOOR") && !line[x].contains("DOORTO")) {
|
||||||
String[] door = line[x].split(",");
|
String[] door = line[x].split(",");
|
||||||
if (line[x].equals("DOOR"))
|
if (door.length == 2)
|
||||||
map.addInteractionEvent(new DoorCell(x, y, map.getImageCell(), window));
|
map.addInteractionEvent(new DoorCell(x, y, Boolean.parseBoolean(door[1]), map.getImageCell(), window));
|
||||||
else
|
else
|
||||||
map.addInteractionEvent(new DoorCell(x, y, door[1], new Dialog(window.getDialogBar()), map.getImageCell(), window, Boolean.parseBoolean(door[2])));
|
map.addInteractionEvent(new DoorCell(x, y, Boolean.parseBoolean(door[1]), door[2], new Dialog(window.getDialogBar()), map.getImageCell(), window, Boolean.parseBoolean(door[3])));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -132,12 +139,12 @@ public class Map {
|
|||||||
else if (line[x].contains("DOORTO")) {
|
else if (line[x].contains("DOORTO")) {
|
||||||
String[] doorTo = line[x].split(",");
|
String[] doorTo = line[x].split(",");
|
||||||
if (doorTo[1].equals("locked")) {
|
if (doorTo[1].equals("locked")) {
|
||||||
map.addInteractionEvent(new DoorCell(x, y, doorTo[2], new Dialog(window.getDialogBar()), map.getImageCell(), window, Boolean.parseBoolean(doorTo[3])));
|
map.addInteractionEvent(new DoorCell(x, y, Boolean.parseBoolean(doorTo[2]), doorTo[3], new Dialog(window.getDialogBar()), map.getImageCell(), window, Boolean.parseBoolean(doorTo[4])));
|
||||||
map.addMoveToEvent(new EventMoveToCell(Integer.parseInt(doorTo[4]), Integer.parseInt(doorTo[5]), x, y, findMapByName(doorTo[6], window), window, false));
|
map.addMoveToEvent(new EventMoveToCell(Integer.parseInt(doorTo[5]), Integer.parseInt(doorTo[6]), x, y, findMapByName(doorTo[7], window), window, false));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
map.addInteractionEvent(new DoorCell(x, y, map.getImageCell(), window));
|
map.addInteractionEvent(new DoorCell(x, y, Boolean.parseBoolean(doorTo[1]), map.getImageCell(), window));
|
||||||
map.addMoveToEvent(new EventMoveToCell(Integer.parseInt(doorTo[1]), Integer.parseInt(doorTo[2]), x, y, findMapByName(doorTo[3], window), window, false));
|
map.addMoveToEvent(new EventMoveToCell(Integer.parseInt(doorTo[2]), Integer.parseInt(doorTo[3]), x, y, findMapByName(doorTo[4], window), window, false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -236,6 +243,14 @@ public class Map {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isBusyCell(int x, int y, boolean half) {
|
||||||
|
for (Block cell : block) {
|
||||||
|
if (cell.isInBlock(x, y, half))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isCellMoveTo(int x, int y) {
|
public boolean isCellMoveTo(int x, int y) {
|
||||||
for (EventMoveToCell cell : moveToCells)
|
for (EventMoveToCell cell : moveToCells)
|
||||||
if (x == cell.getX() && y == cell.getY() && cell.getClass().getName().equals("ruscz.game.gameOfProd.Cells.EventMoveToCell"))
|
if (x == cell.getX() && y == cell.getY() && cell.getClass().getName().equals("ruscz.game.gameOfProd.Cells.EventMoveToCell"))
|
||||||
|
|||||||
@ -183,41 +183,6 @@ public class WindowOfFreeMove extends JLayeredPane {
|
|||||||
|
|
||||||
public class Canvas extends JPanel {
|
public class Canvas extends JPanel {
|
||||||
@Override
|
@Override
|
||||||
// public void paint(Graphics g) {
|
|
||||||
// if (isReadyToPaint) {
|
|
||||||
// super.paint(g);
|
|
||||||
// Graphics2D g2D = (Graphics2D) g;
|
|
||||||
// g2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
|
|
||||||
// RenderingHints.VALUE_ANTIALIAS_ON);
|
|
||||||
// for (int i = 0; i < mapManager.getActualMap().getCanvasSize()[0]; i++) {
|
|
||||||
// for (int j = 0; j < mapManager.getActualMap().getCanvasSize()[1]; j++) {
|
|
||||||
// mapManager.getActualMap().getImageCell().paintBackground(g2D, i, j);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// for (Cell cell : mapManager.getActualMap().getMoveToCells()) {
|
|
||||||
// cell.paint(g2D);
|
|
||||||
// }
|
|
||||||
// for (Cell cell : mapManager.getActualMap().getBlocks()) {
|
|
||||||
// cell.paint(g2D);
|
|
||||||
// }
|
|
||||||
// for (Cell cell : mapManager.getActualMap().getInteractionEventCells()) {
|
|
||||||
// cell.paint(g2D);
|
|
||||||
// }
|
|
||||||
// for (Cell cell : mapManager.getActualMap().getDoorCells()) {
|
|
||||||
// cell.paint(g2D);
|
|
||||||
// }
|
|
||||||
// for (Person person : mapManager.getActualMap().getNpcs()) {
|
|
||||||
// person.paint(g2D);
|
|
||||||
// }
|
|
||||||
// for (int i = 0; i < mapManager.getActualMap().getCanvasSize()[0]; i++) {
|
|
||||||
// for (int j = 0; j < mapManager.getActualMap().getCanvasSize()[1]; j++) {
|
|
||||||
// mapManager.getActualMap().getImageCell().paintForeground(g2D, i, j);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// mapManager.getActualMap().getPerson().paint(g2D);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
public void paint(Graphics g) {
|
public void paint(Graphics g) {
|
||||||
if (isReadyToPaint) {
|
if (isReadyToPaint) {
|
||||||
super.paint(g);
|
super.paint(g);
|
||||||
@ -231,15 +196,18 @@ public class WindowOfFreeMove extends JLayeredPane {
|
|||||||
for (Cell cell : mapManager.getActualMap().getMoveToCells()) {
|
for (Cell cell : mapManager.getActualMap().getMoveToCells()) {
|
||||||
if (cell.getY() == i) cell.paint(g2D);
|
if (cell.getY() == i) cell.paint(g2D);
|
||||||
}
|
}
|
||||||
for (Cell cell : mapManager.getActualMap().getBlocks()) {
|
for (Block cell : mapManager.getActualMap().getBlocks()) {
|
||||||
if (cell.getY() == i) cell.paint(g2D);
|
if (cell.getY() == i && !cell.isPartial()) cell.paint(g2D);
|
||||||
}
|
}
|
||||||
if (mapManager.getActualMap().getPerson().getY() == i && mapManager.getActualMap().getPerson().getDirectionMoveLast() != KEY_UP) mapManager.getActualMap().getPerson().paint(g2D);
|
if (mapManager.getActualMap().getPerson().getY() == i && mapManager.getActualMap().getPerson().getDirectionMoveLast() != KEY_UP) mapManager.getActualMap().getPerson().paint(g2D);
|
||||||
for (Cell cell : mapManager.getActualMap().getInteractionEventCells()) {
|
for (Cell cell : mapManager.getActualMap().getInteractionEventCells()) {
|
||||||
if (cell.getY() == i) cell.paint(g2D);
|
if (cell.getY() == i) cell.paint(g2D);
|
||||||
}
|
}
|
||||||
if (mapManager.getActualMap().getPerson().getY() == (i-1) && mapManager.getActualMap().getPerson().getDirectionMoveLast() == KEY_UP) mapManager.getActualMap().getPerson().paint(g2D);
|
if (mapManager.getActualMap().getPerson().getY() == (i-1) && mapManager.getActualMap().getPerson().getDirectionMoveLast() == KEY_UP) mapManager.getActualMap().getPerson().paint(g2D);
|
||||||
for (Cell cell : mapManager.getActualMap().getDoorCells()) {
|
for (Block cell : mapManager.getActualMap().getBlocks()) {
|
||||||
|
if (cell.getY() == i && cell.isPartial()) cell.paint(g2D);
|
||||||
|
}
|
||||||
|
for (DoorCell cell : mapManager.getActualMap().getDoorCells()) {
|
||||||
if (cell.getY() == i) cell.paint(g2D);
|
if (cell.getY() == i) cell.paint(g2D);
|
||||||
}
|
}
|
||||||
for (Person person : mapManager.getActualMap().getNpcs()) {
|
for (Person person : mapManager.getActualMap().getNpcs()) {
|
||||||
|
|||||||
BIN
src/main/resources/dark-door.png
Normal file
BIN
src/main/resources/dark-door.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@ -2,4 +2,4 @@ BLOCK 2
|
|||||||
MOVETO 1
|
MOVETO 1
|
||||||
EVENT 3
|
EVENT 3
|
||||||
TRIGGER 4
|
TRIGGER 4
|
||||||
DOOR 254
|
DOOR dark-door.png,32
|
||||||
@ -17,5 +17,5 @@ BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
|||||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||||
BLOCK EMPTY EMPTY EMPTY TRIGGER,ohhimark EMPTY EMPTY EMPTY BLOCK
|
BLOCK BLOCK,d BLOCK,d BLOCK,d TRIGGER,ohhimark BLOCK,d BLOCK,d BLOCK,d BLOCK
|
||||||
BLOCK BLOCK BLOCK BLOCK DOORTO,0,1,office BLOCK BLOCK BLOCK BLOCK
|
BLOCK BLOCK BLOCK BLOCK DOORTO,true,0,1,office BLOCK BLOCK BLOCK BLOCK
|
||||||
@ -2,4 +2,4 @@ BLOCK 2
|
|||||||
MOVETO 1
|
MOVETO 1
|
||||||
EVENT 3
|
EVENT 3
|
||||||
TRIGGER 4
|
TRIGGER 4
|
||||||
DOOR 254
|
DOOR dark-door.png,32
|
||||||
@ -2,8 +2,7 @@
|
|||||||
<tileset> Openspace1.png 512 512 32
|
<tileset> Openspace1.png 512 512 32
|
||||||
<tileset> Openspace2.png 512 512 32
|
<tileset> Openspace2.png 512 512 32
|
||||||
<tileset> D_Inside_House.png 512 512 32
|
<tileset> D_Inside_House.png 512 512 32
|
||||||
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
|
||||||
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
||||||
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
||||||
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
||||||
@ -18,3 +17,5 @@
|
|||||||
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
||||||
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
||||||
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
||||||
|
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
||||||
|
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
|
||||||
@ -1,17 +1,14 @@
|
|||||||
20 16
|
20 13
|
||||||
BLOCK BLOCK BLOCK BLOCK DOOR BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK
|
BLOCK,d BLOCK,d BLOCK,d BLOCK,d EMPTY BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d
|
||||||
BLOCK BLOCK BLOCK BLOCK DOORTO,0,3,boss BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK
|
BLOCK BLOCK BLOCK BLOCK DOORTO,true,0,3,boss BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK
|
||||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block
|
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block
|
||||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK
|
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK
|
||||||
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK
|
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK
|
||||||
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK
|
|
||||||
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,1,2,openspace EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK
|
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,1,2,openspace EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK
|
||||||
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,1,2,openspace EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK
|
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,1,2,openspace EMPTY EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK
|
||||||
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK
|
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK
|
||||||
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK
|
|
||||||
BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block
|
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block
|
||||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
BLOCK BLOCK,d EMPTY BLOCK,d BLOCK,d BLOCK,d BLOCK,d EMPTY BLOCK,d BLOCK,d BLOCK,d BLOCK,d EMPTY BLOCK,d BLOCK,d BLOCK,d BLOCK,d EMPTY BLOCK,d BLOCK
|
||||||
BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK
|
BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK
|
||||||
BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK BLOCK DOOR,locked,false BLOCK BLOCK
|
|
||||||
@ -2,4 +2,4 @@ BLOCK 2
|
|||||||
MOVETO 1
|
MOVETO 1
|
||||||
EVENT 0
|
EVENT 0
|
||||||
TRIGGER 4
|
TRIGGER 4
|
||||||
DOOR 254
|
DOOR dark-door.png,32
|
||||||
@ -2,17 +2,17 @@
|
|||||||
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK
|
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK
|
||||||
BLOCK block block block EMPTY EMPTY EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY inter,laugh inter,laugh EMPTY EMPTY BLOCK
|
BLOCK block block block EMPTY EMPTY EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY inter,laugh inter,laugh EMPTY EMPTY BLOCK
|
||||||
BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||||
BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block
|
BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK,u EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block
|
||||||
BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY DOOR EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block
|
BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY DOOR,false EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block
|
||||||
BLOCK BLOCK DOOR,locked,false BLOCK BLOCK BLOCK DOOR BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block
|
BLOCK BLOCK,d EMPTY BLOCK,d BLOCK,d BLOCK,d EMPTY BLOCK,d BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block
|
||||||
BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block
|
BLOCK BLOCK DOOR,true,locked,false BLOCK BLOCK BLOCK DOOR,true BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block
|
||||||
BLOCK block EMPTY block BLOCK block EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block
|
BLOCK block EMPTY block BLOCK block EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY block block block block EMPTY block
|
||||||
BLOCK block EMPTY block BLOCK block EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
BLOCK block EMPTY block BLOCK block EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||||
BLOCK block EMPTY block BLOCK block EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
BLOCK block EMPTY block BLOCK block EMPTY block BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK,d BLOCK,d BLOCK,d EMPTY BLOCK,d BLOCK,d BLOCK
|
||||||
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK DOOR BLOCK BLOCK BLOCK
|
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK BLOCK DOOR,true BLOCK BLOCK BLOCK
|
||||||
BLOCK EMPTY block block EMPTY inter,minecraft inter,minecraft EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
BLOCK EMPTY block block EMPTY inter,minecraft inter,minecraft EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||||
BLOCK EMPTY block block EMPTY inter,minecraft inter,minecraft EMPTY BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY block EMPTY EMPTY EMPTY block block
|
BLOCK EMPTY block block EMPTY inter,minecraft inter,minecraft EMPTY BLOCK,u EMPTY EMPTY EMPTY EMPTY EMPTY block EMPTY EMPTY EMPTY block block
|
||||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY DOOR EMPTY EMPTY EMPTY EMPTY EMPTY block block EMPTY block block block
|
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY DOOR,false EMPTY EMPTY EMPTY EMPTY EMPTY block block EMPTY block block block
|
||||||
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block
|
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block
|
||||||
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,1,2,office EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,1,2,office EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||||
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,0,2,m1 EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block EMPTY block EMPTY BLOCK
|
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK EMPTY moveto,0,2,m1 EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block EMPTY block EMPTY BLOCK
|
||||||
|
|||||||
@ -64,7 +64,7 @@
|
|||||||
<event>
|
<event>
|
||||||
<x>4</x>
|
<x>4</x>
|
||||||
<y>18</y>
|
<y>18</y>
|
||||||
<active>true</active>
|
<active>false</active>
|
||||||
</event>
|
</event>
|
||||||
</events>
|
</events>
|
||||||
</map>
|
</map>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user