a lot of final fixes
@ -23,8 +23,8 @@ public class Npc extends Person {
|
||||
private int height;
|
||||
private int offsetX;
|
||||
private int offsetY;
|
||||
private int widthCoef;
|
||||
private int heightCoef;
|
||||
private double widthCoef;
|
||||
private double heightCoef;
|
||||
private String imageNpc;
|
||||
private String battle;
|
||||
private Timer timer;
|
||||
@ -121,8 +121,8 @@ public class Npc extends Person {
|
||||
direction = Integer.parseInt(imageInfo[2]);
|
||||
offsetX = Integer.parseInt(imageInfo[3]);
|
||||
offsetY = Integer.parseInt(imageInfo[4]);
|
||||
widthCoef = Integer.parseInt(imageInfo[5]);
|
||||
heightCoef = Integer.parseInt(imageInfo[6]);
|
||||
widthCoef = Double.parseDouble(imageInfo[5]);
|
||||
heightCoef = Double.parseDouble(imageInfo[6]);
|
||||
imageNpc = scanner.nextLine();
|
||||
if (scanner.hasNextLine()) battle = scanner.nextLine();
|
||||
}
|
||||
@ -134,7 +134,7 @@ public class Npc extends Person {
|
||||
try {
|
||||
image = ImageIO.read(new File("src/main/resources/characters/" + name + "/" + imageNpc)).getSubimage(width * direction, 0, width, height);
|
||||
g.drawImage(image, getX() * getSize() + (getSize() / 5) + offsetX,
|
||||
getY() * getSize() - (getSize() * 3 / 5) + offsetY, getSize() * widthCoef / 5, getSize() * heightCoef / 2, null);
|
||||
getY() * getSize() - (getSize() * 3 / 5) + offsetY, (int) (getSize() * widthCoef / 5), (int) (getSize() * heightCoef / 2), null);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@ -5,8 +5,11 @@ import ruscz.game.gameOfProd.Windows.WindowOfBattle;
|
||||
import ruscz.game.gameOfProd.Windows.WindowOfFreeMove;
|
||||
import ruscz.game.gameOfProd.Windows.WindowOfMenu;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class Game extends JFrame {
|
||||
private static final int WINDOW_WIDTH = 13;
|
||||
@ -61,6 +64,11 @@ public class Game extends JFrame {
|
||||
setVisible(true);
|
||||
getContentPane().setBackground(Color.BLACK);
|
||||
setExtendedState(MAXIMIZED_BOTH);
|
||||
try {
|
||||
setIconImage(ImageIO.read(new File("src/main/resources/images/icon.png")).getScaledInstance(64, 64, Image.SCALE_DEFAULT));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public Game game() {
|
||||
|
||||
@ -80,9 +80,10 @@ public class CellSetConfig {
|
||||
|
||||
infoPanel.add(saveInfo);
|
||||
|
||||
scrollInfo.revalidate();
|
||||
scrollInfo.requestFocus();
|
||||
// scrollInfo.revalidate();
|
||||
// scrollInfo.requestFocus();
|
||||
view.add(scrollInfo);
|
||||
scrollInfo.repaint();
|
||||
}
|
||||
|
||||
private JLabel nameLabel(String name, int offset) {
|
||||
|
||||
@ -57,8 +57,8 @@ public class EditorSaveManager {
|
||||
for (int i = 0; i < editor.getMapHeight(); i++) {
|
||||
for (int j = 0; j < editor.getMapWidth(); j++) {
|
||||
if (j != 0) info += " ";
|
||||
if (set[i][j].split(",")[0].contains("door")) info += "EMPTY";
|
||||
else info += set[i][j];
|
||||
if (set[j][i].split(",")[0].contains("door")) info += "EMPTY";
|
||||
else info += set[j][i];
|
||||
if (j == editor.getMapWidth() - 1 && i != editor.getMapHeight() - 1) info += System.lineSeparator();
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,11 +35,6 @@ public class InfoManager {
|
||||
info.setBounds(20, 200, 260, 730);
|
||||
info.setLayout(null);
|
||||
|
||||
detailedCellInfo = new DetailedCellInfo(editor, x, y);
|
||||
detailedCellInfo.setBounds(20, 270, 260, 520);
|
||||
detailedCellInfo.setLayout(null);
|
||||
detailedCellInfo.setVisible(false);
|
||||
|
||||
switch (layer) {
|
||||
case "object":
|
||||
displayObjectAndTileInfo(label, x, y, true);
|
||||
@ -52,7 +47,6 @@ public class InfoManager {
|
||||
break;
|
||||
}
|
||||
|
||||
view.add(detailedCellInfo, JLayeredPane.POPUP_LAYER);
|
||||
view.add(info, JLayeredPane.MODAL_LAYER);
|
||||
view.revalidate();
|
||||
}
|
||||
@ -149,6 +143,7 @@ public class InfoManager {
|
||||
editor.getMapLayers().repaintTileset();
|
||||
}
|
||||
info.removeAll();
|
||||
info.setVisible(false);
|
||||
view.remove(info);
|
||||
view.revalidate();
|
||||
view.repaint();
|
||||
@ -166,6 +161,12 @@ public class InfoManager {
|
||||
private void displayCellInfo(JLabel label, int x, int y) {
|
||||
String[] array = {"EMPTY", "BLOCK", "INTER", "TRIGGER", "MOVETO", "DOOR", "DOORTO", "CHEST"};
|
||||
|
||||
detailedCellInfo = new DetailedCellInfo(editor, x, y);
|
||||
detailedCellInfo.setBounds(20, 270, 260, 520);
|
||||
detailedCellInfo.setLayout(null);
|
||||
detailedCellInfo.setVisible(false);
|
||||
view.add(detailedCellInfo, JLayeredPane.POPUP_LAYER);
|
||||
|
||||
JLabel infoLabel = new JLabel();
|
||||
infoLabel.setBounds(0, 0, 50, 50);
|
||||
infoLabel.setIcon(label.getIcon());
|
||||
@ -208,13 +209,12 @@ public class InfoManager {
|
||||
|
||||
openCellMap.setBounds(30, 600, 200, 30);
|
||||
openCellMap.addActionListener(e -> {
|
||||
info.removeAll();
|
||||
info.revalidate();
|
||||
detailedCellInfo.removeAll();
|
||||
detailedCellInfo.revalidate();
|
||||
// info.removeAll();
|
||||
// info.revalidate();
|
||||
// detailedCellInfo.removeAll();
|
||||
// detailedCellInfo.revalidate();
|
||||
view.remove(info);
|
||||
view.remove(detailedCellInfo);
|
||||
view.revalidate();
|
||||
new CellSetConfig(editor, scrollInfo).displayCellSetConfig();
|
||||
});
|
||||
|
||||
@ -259,4 +259,8 @@ public class InfoManager {
|
||||
editor.getCellArray()[x][y+1] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JPanel getInfo() {
|
||||
return info;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import ruscz.game.gameOfProd.Cells.TypeOfCell;
|
||||
import ruscz.game.gameOfProd.Map.Map;
|
||||
import ruscz.game.gameOfProd.Windows.WindowOfFreeMove;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
@ -11,6 +12,8 @@ import java.awt.event.ActionListener;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseListener;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
@ -88,8 +91,7 @@ public class LevelEditor extends JFrame {
|
||||
view.revalidate();
|
||||
view.repaint();
|
||||
createNewMap(name, width, height);
|
||||
}
|
||||
catch (NumberFormatException ex) {
|
||||
} catch (NumberFormatException ex) {
|
||||
error.setText("<html><div style='text-align: center; width: 1300; color: red'>One or more values (apart from Name) is not an Integer.</div></html>");
|
||||
error.setVisible(true);
|
||||
}
|
||||
@ -114,6 +116,11 @@ public class LevelEditor extends JFrame {
|
||||
setLayout(null);
|
||||
setVisible(true);
|
||||
setResizable(false);
|
||||
try {
|
||||
setIconImage(ImageIO.read(new File("src/main/resources/images/icon.png")).getScaledInstance(64, 64, Image.SCALE_DEFAULT));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void createNewMap(String name, int width, int height) {
|
||||
@ -152,6 +159,7 @@ public class LevelEditor extends JFrame {
|
||||
importTilesets.addActionListener(e -> {
|
||||
imagesOfTiles = overview.getImagesOfTiles();
|
||||
mapLayersManager.repaintSets();
|
||||
if (infoManager.getInfo() != null) infoManager.getInfo().repaint();
|
||||
});
|
||||
|
||||
JButton openTilesets = new JButton("Open Tileset Overview");
|
||||
@ -184,11 +192,18 @@ public class LevelEditor extends JFrame {
|
||||
mapViewer.getVerticalScrollBar().setUnitIncrement(10);
|
||||
|
||||
JLabel objectLabel = new JLabel("Object Layer");
|
||||
objectLabel.setBounds( 500, 30, 100, 20);
|
||||
objectLabel.setBounds(500, 30, 100, 20);
|
||||
JCheckBox objectBox = new JCheckBox();
|
||||
objectBox.setBounds(600, 30, 30, 20);
|
||||
objectBox.setSelected(true);
|
||||
objectBox.addActionListener(actionEvent -> {
|
||||
if (infoManager.getInfo() != null) {
|
||||
infoManager.getInfo().removeAll();
|
||||
infoManager.getInfo().setVisible(false);
|
||||
view.remove(infoManager.getInfo());
|
||||
view.revalidate();
|
||||
view.repaint();
|
||||
}
|
||||
if (objectSet.isVisible()) objectSet.setVisible(false);
|
||||
else {
|
||||
objectSet.setVisible(true);
|
||||
@ -196,21 +211,35 @@ public class LevelEditor extends JFrame {
|
||||
});
|
||||
|
||||
JLabel cellLabel = new JLabel("Physical (cell) Layer");
|
||||
cellLabel.setBounds( 700, 30, 150, 20);
|
||||
cellLabel.setBounds(700, 30, 150, 20);
|
||||
JCheckBox cellBox = new JCheckBox();
|
||||
cellBox.setBounds(850, 30, 30, 20);
|
||||
cellBox.setSelected(true);
|
||||
cellBox.addActionListener(actionEvent -> {
|
||||
if (infoManager.getInfo() != null) {
|
||||
infoManager.getInfo().removeAll();
|
||||
infoManager.getInfo().setVisible(false);
|
||||
view.remove(infoManager.getInfo());
|
||||
view.revalidate();
|
||||
view.repaint();
|
||||
}
|
||||
if (cellSet.isVisible()) cellSet.setVisible(false);
|
||||
else cellSet.setVisible(true);
|
||||
});
|
||||
|
||||
JLabel tileLabel = new JLabel("Tile Layer");
|
||||
tileLabel.setBounds( 950, 30, 100, 20);
|
||||
tileLabel.setBounds(950, 30, 100, 20);
|
||||
JCheckBox tileBox = new JCheckBox();
|
||||
tileBox.setBounds(1030, 30, 30, 20);
|
||||
tileBox.setSelected(true);
|
||||
tileBox.addActionListener(actionEvent -> {
|
||||
if (infoManager.getInfo() != null) {
|
||||
infoManager.getInfo().removeAll();
|
||||
infoManager.getInfo().setVisible(false);
|
||||
view.remove(infoManager.getInfo());
|
||||
view.revalidate();
|
||||
view.repaint();
|
||||
}
|
||||
if (tileSet.isVisible()) tileSet.setVisible(false);
|
||||
else tileSet.setVisible(true);
|
||||
});
|
||||
@ -228,8 +257,13 @@ public class LevelEditor extends JFrame {
|
||||
new EditorSaveManager(getEditor()).saveMap();
|
||||
}
|
||||
|
||||
@Override public void mousePressed(MouseEvent e) {}
|
||||
@Override public void mouseReleased(MouseEvent e) {}
|
||||
@Override
|
||||
public void mousePressed(MouseEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseEntered(MouseEvent e) {
|
||||
@ -280,7 +314,9 @@ public class LevelEditor extends JFrame {
|
||||
errorMessage.setVisible(true);
|
||||
}
|
||||
|
||||
protected void hideError() { errorMessage.setVisible(false); }
|
||||
protected void hideError() {
|
||||
errorMessage.setVisible(false);
|
||||
}
|
||||
|
||||
public JLayeredPane getView() {
|
||||
return view;
|
||||
@ -318,19 +354,27 @@ public class LevelEditor extends JFrame {
|
||||
return mapLayersManager;
|
||||
}
|
||||
|
||||
public HashMap<String, Integer> getCellMap() { return cellMap; }
|
||||
public HashMap<String, Integer> getCellMap() {
|
||||
return cellMap;
|
||||
}
|
||||
|
||||
public void setCellMap(HashMap<String, Integer> cellMap) {
|
||||
this.cellMap = cellMap;
|
||||
}
|
||||
|
||||
public String[][] getCellArray() { return cellArray; }
|
||||
public String[][] getCellArray() {
|
||||
return cellArray;
|
||||
}
|
||||
|
||||
public void setCellArray(String[][] cellArray) { this.cellArray = cellArray; }
|
||||
public void setCellArray(String[][] cellArray) {
|
||||
this.cellArray = cellArray;
|
||||
}
|
||||
|
||||
public void setOverview(TilesetOverview overview) {
|
||||
this.overview = overview;
|
||||
}
|
||||
|
||||
public LevelEditor getEditor() { return this; }
|
||||
public LevelEditor getEditor() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,6 +91,7 @@ public class MapLayersManager {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
editor.getInfoManager().displayInfo(object, "object", x, y);
|
||||
System.out.println("object");
|
||||
}
|
||||
});
|
||||
objectSet.add(object);
|
||||
@ -138,7 +139,7 @@ public class MapLayersManager {
|
||||
for (int j = 0; j < height; j++) {
|
||||
JLabel tile = new JLabel();
|
||||
if (imagesOfTiles == null || imagesOfTiles.size() == 0) {
|
||||
tile.setText("<html><div style='text-align: center; width: 50'>" + String.valueOf(map.getImageCell().getMapBackground()[i][j]) + "</div></html>");
|
||||
tile.setText("<html><div style='text-align: center; width: 50'>" + map.getImageCell().getMapBackground()[i][j] + "</div></html>");
|
||||
tile.setHorizontalTextPosition(JLabel.CENTER);
|
||||
tileSet.setOpaque(true);
|
||||
tileSet.setBackground(Color.BLUE);
|
||||
@ -158,6 +159,7 @@ public class MapLayersManager {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
editor.getInfoManager().displayInfo(tile, "tile", x, y);
|
||||
System.out.println("tile");
|
||||
}
|
||||
});
|
||||
tileSet.add(tile);
|
||||
|
||||
@ -64,6 +64,11 @@ public class TilesetOverview extends JFrame {
|
||||
setLocationRelativeTo(null);
|
||||
setVisible(true);
|
||||
setResizable(false);
|
||||
try {
|
||||
setIconImage(ImageIO.read(new File("src/main/resources/images/icon.png")).getScaledInstance(64, 64, Image.SCALE_DEFAULT));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void loadTileset(String name) {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package ruscz.game.gameOfProd.Save;
|
||||
|
||||
import ruscz.game.gameOfProd.Cells.ChestCell;
|
||||
import ruscz.game.gameOfProd.Cells.DoorCell;
|
||||
import ruscz.game.gameOfProd.Cells.Npc;
|
||||
import ruscz.game.gameOfProd.Cells.TriggerCell;
|
||||
import ruscz.game.gameOfProd.Inventory.InventoryManager;
|
||||
@ -154,6 +155,11 @@ public class LoadManager {
|
||||
ChestCell chestCell = map.findChestByXY(Integer.parseInt(getValue(scanner.nextLine())), Integer.parseInt(getValue(scanner.nextLine())));
|
||||
chestCell.setActive(Boolean.parseBoolean(getValue(scanner.nextLine())));
|
||||
}
|
||||
else if (data.contains("<door>")) {
|
||||
DoorCell doorCell = map.findDoorByXY(Integer.parseInt(getValue(scanner.nextLine())), Integer.parseInt(getValue(scanner.nextLine())));
|
||||
doorCell.setLocked(Boolean.parseBoolean(getValue(scanner.nextLine())));
|
||||
doorCell.setOpen(Boolean.parseBoolean(getValue(scanner.nextLine())));
|
||||
}
|
||||
}
|
||||
scanner.close();
|
||||
} catch (FileNotFoundException e) {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package ruscz.game.gameOfProd.Save;
|
||||
|
||||
import ruscz.game.gameOfProd.Cells.ChestCell;
|
||||
import ruscz.game.gameOfProd.Cells.DoorCell;
|
||||
import ruscz.game.gameOfProd.Cells.Person;
|
||||
import ruscz.game.gameOfProd.Cells.TriggerCell;
|
||||
import ruscz.game.gameOfProd.Inventory.InventoryManager;
|
||||
@ -71,6 +72,16 @@ public class SaveManager {
|
||||
" </chest>" + System.lineSeparator();
|
||||
mapInfo += event;
|
||||
}
|
||||
for (DoorCell doorCell : map.getDoorCells()) {
|
||||
String event =
|
||||
" <door>" + System.lineSeparator() +
|
||||
" <x>" + doorCell.getX() + "</x>" + System.lineSeparator() +
|
||||
" <y>" + doorCell.getY() + "</y>" + System.lineSeparator() +
|
||||
" <locked>" + doorCell.isLocked() + "</locked>" + System.lineSeparator() +
|
||||
" <open>" + doorCell.isOpen() + "</open>" + System.lineSeparator() +
|
||||
" </dooŕ>" + System.lineSeparator();
|
||||
mapInfo += event;
|
||||
}
|
||||
mapInfo +=
|
||||
" </events>" + System.lineSeparator() +
|
||||
"</map>" + System.lineSeparator();
|
||||
|
||||
@ -248,7 +248,7 @@ public class WindowOfBattle extends JPanel {
|
||||
|
||||
public void addImage(String name) {
|
||||
try {
|
||||
images.add(ImageIO.read(new File("src/main/resources/foregrounds/" + name + ".png")));
|
||||
images.add(ImageIO.read(new File("src/main/resources/images/" + name + ".png")));
|
||||
image = images.getLast();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
@ -257,7 +257,7 @@ public class WindowOfBattle extends JPanel {
|
||||
|
||||
public void setImage(String name) {
|
||||
try {
|
||||
image = ImageIO.read(new File("src/main/resources/foregrounds/" + name + ".png"));
|
||||
image = ImageIO.read(new File("src/main/resources/images/" + name + ".png"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@ -282,7 +282,7 @@ public class WindowOfFreeMove extends JLayeredPane {
|
||||
if (name == null) imageForeground = null;
|
||||
else {
|
||||
try {
|
||||
imageForeground = ImageIO.read(new File("src/main/resources/foregrounds/" + name + ".png"));
|
||||
imageForeground = ImageIO.read(new File("src/main/resources/images/" + name + ".png"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@ -198,9 +198,11 @@ public class WindowOfMenu extends JPanel {
|
||||
if (!getIgnoreRepaint()) {
|
||||
Image powered = null;
|
||||
Image menu = null;
|
||||
Image logo = null;
|
||||
try {
|
||||
powered = ImageIO.read(new File("src/main/resources/foregrounds/poweredByCellEngine.png"));
|
||||
menu = ImageIO.read(new File("src/main/resources/foregrounds/menu.png"));
|
||||
powered = ImageIO.read(new File("src/main/resources/images/poweredByCellEngine.png"));
|
||||
menu = ImageIO.read(new File("src/main/resources/images/menu.png"));
|
||||
logo = ImageIO.read(new File("src/main/resources/images/logo.png"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -209,7 +211,11 @@ public class WindowOfMenu extends JPanel {
|
||||
if (!showMenu)
|
||||
g.drawImage(powered, (screenSize.width - (powered.getWidth(null) / 2)) / 2, (screenSize.height - (powered.getHeight(null) / 2)) / 2,
|
||||
(powered.getWidth(null) / 2), (powered.getHeight(null) / 2), null);
|
||||
else g.drawImage(menu, 0, 0, screenSize.width, screenSize.height, null);
|
||||
else {
|
||||
g.drawImage(menu, 0, 0, screenSize.width, screenSize.height, null);
|
||||
g.drawImage(logo, (screenSize.width - (logo.getWidth(null) * 3)) / 2, 50,
|
||||
logo.getWidth(null) * 3, logo.getHeight(null) * 3, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
7 7 storageroom
|
||||
30 79 1 0 20 2 2
|
||||
10 9 storageroom
|
||||
30 79 1 0 20 2.5 2.5
|
||||
monster.png
|
||||
storageroombattle
|
||||
|
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 156 KiB |
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 202 KiB After Width: | Height: | Size: 202 KiB |
|
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
BIN
src/main/resources/images/icon.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/main/resources/images/logo.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
src/main/resources/images/logo2.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@ -1,13 +1,13 @@
|
||||
0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
0 131 147 242 242 0 0 0 0 0 0 0 0
|
||||
0 132 148 243 243 0 0 0 0 0 0 419 0
|
||||
0 0 0 0 0 0 0 0 0 0 0 420 0
|
||||
0 390 0 0 0 0 0 0 0 0 0 435 0
|
||||
0 461 461 0 0 0 0 0 0 0 0 436 0
|
||||
0 462 462 0 0 0 0 0 0 395 395 395 0
|
||||
0 391 423 0 0 0 0 0 0 396 396 396 0
|
||||
0 423 0 0 0 0 0 515 531 0 0 0 0
|
||||
0 0 0 0 0 0 0 516 532 397 413 429 0
|
||||
0 821 0 0 0 0 0 0 0 398 414 430 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 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 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 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 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 0 0 0 0 0 0 0
|
||||
0 0 0 7 7 7 0 7 7 7 0 0 0
|
||||
@ -12,8 +12,8 @@
|
||||
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 379 6 6 6 6 6 6 6 6 6 6 6
|
||||
6 6 378 6 6 6 6 379 6 6 6 6 6
|
||||
6 6 6 6 6 6 6 6 6 6 6 6 6
|
||||
6 6 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,14 +1,14 @@
|
||||
13 13
|
||||
BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d EMPTY BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d BLOCK,d
|
||||
BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK DOORTO,true,4,3,office BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK
|
||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY TRIGGER,cutscene-fight EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||
BLOCK block block block block EMPTY TRIGGER,cutscene-fight EMPTY EMPTY EMPTY EMPTY block BLOCK
|
||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK
|
||||
BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK
|
||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block BLOCK
|
||||
BLOCK block block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||
BLOCK block block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block block block BLOCK
|
||||
BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block block EMPTY block EMPTY BLOCK
|
||||
BLOCK block EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY block block block BLOCK
|
||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK
|
||||
BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY 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
|
||||
@ -14,7 +14,7 @@
|
||||
<trigger>
|
||||
<x>6</x>
|
||||
<y>4</y>
|
||||
<active>false</active>
|
||||
<active>true</active>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<x>14</x>
|
||||
@ -24,13 +24,43 @@
|
||||
<chest>
|
||||
<x>1</x>
|
||||
<y>2</y>
|
||||
<active>false</active>
|
||||
<active>true</active>
|
||||
</chest>
|
||||
<chest>
|
||||
<x>15</x>
|
||||
<y>7</y>
|
||||
<active>true</active>
|
||||
</chest>
|
||||
<door>
|
||||
<x>8</x>
|
||||
<y>4</y>
|
||||
<locked>false</locked>
|
||||
<open>false</open>
|
||||
</dooŕ>
|
||||
<door>
|
||||
<x>2</x>
|
||||
<y>6</y>
|
||||
<locked>true</locked>
|
||||
<open>false</open>
|
||||
</dooŕ>
|
||||
<door>
|
||||
<x>6</x>
|
||||
<y>6</y>
|
||||
<locked>false</locked>
|
||||
<open>false</open>
|
||||
</dooŕ>
|
||||
<door>
|
||||
<x>16</x>
|
||||
<y>10</y>
|
||||
<locked>false</locked>
|
||||
<open>false</open>
|
||||
</dooŕ>
|
||||
<door>
|
||||
<x>8</x>
|
||||
<y>13</y>
|
||||
<locked>false</locked>
|
||||
<open>true</open>
|
||||
</dooŕ>
|
||||
</events>
|
||||
</map>
|
||||
<map>
|
||||
@ -44,8 +74,50 @@
|
||||
<chest>
|
||||
<x>1</x>
|
||||
<y>9</y>
|
||||
<active>true</active>
|
||||
<active>false</active>
|
||||
</chest>
|
||||
<door>
|
||||
<x>12</x>
|
||||
<y>1</y>
|
||||
<locked>true</locked>
|
||||
<open>false</open>
|
||||
</dooŕ>
|
||||
<door>
|
||||
<x>17</x>
|
||||
<y>1</y>
|
||||
<locked>true</locked>
|
||||
<open>false</open>
|
||||
</dooŕ>
|
||||
<door>
|
||||
<x>7</x>
|
||||
<y>12</y>
|
||||
<locked>true</locked>
|
||||
<open>false</open>
|
||||
</dooŕ>
|
||||
<door>
|
||||
<x>12</x>
|
||||
<y>12</y>
|
||||
<locked>true</locked>
|
||||
<open>false</open>
|
||||
</dooŕ>
|
||||
<door>
|
||||
<x>4</x>
|
||||
<y>1</y>
|
||||
<locked>false</locked>
|
||||
<open>false</open>
|
||||
</dooŕ>
|
||||
<door>
|
||||
<x>2</x>
|
||||
<y>12</y>
|
||||
<locked>false</locked>
|
||||
<open>false</open>
|
||||
</dooŕ>
|
||||
<door>
|
||||
<x>17</x>
|
||||
<y>12</y>
|
||||
<locked>true</locked>
|
||||
<open>false</open>
|
||||
</dooŕ>
|
||||
</events>
|
||||
</map>
|
||||
<map>
|
||||
@ -56,6 +128,12 @@
|
||||
<y>18</y>
|
||||
<active>true</active>
|
||||
</trigger>
|
||||
<door>
|
||||
<x>4</x>
|
||||
<y>19</y>
|
||||
<locked>false</locked>
|
||||
<open>false</open>
|
||||
</dooŕ>
|
||||
</events>
|
||||
</map>
|
||||
<map>
|
||||
@ -76,5 +154,11 @@
|
||||
<y>2</y>
|
||||
<active>true</active>
|
||||
</trigger>
|
||||
<door>
|
||||
<x>6</x>
|
||||
<y>1</y>
|
||||
<locked>false</locked>
|
||||
<open>false</open>
|
||||
</dooŕ>
|
||||
</events>
|
||||
</map>
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
<item>
|
||||
<name>cup-o'-coffee</name>
|
||||
<multiplicity>1</multiplicity>
|
||||
<image>295</image>
|
||||
<action>heal</action>
|
||||
</item>
|
||||
@ -1,6 +1,6 @@
|
||||
<location>
|
||||
<map>storageroom</map>
|
||||
<x>6</x>
|
||||
<y>2</y>
|
||||
<direction>0</direction>
|
||||
<map>openspace</map>
|
||||
<x>8</x>
|
||||
<y>15</y>
|
||||
<direction>3</direction>
|
||||
</location>
|
||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
@ -126,7 +126,10 @@ public class LevelEditorTest {
|
||||
scanner.nextLine();
|
||||
int i = 0;
|
||||
while (scanner.hasNextLine()) {
|
||||
cellArray[i] = scanner.nextLine().split(" ");
|
||||
String[] data = scanner.nextLine().split(" ");
|
||||
for (int j = 0; j < data.length; j++) {
|
||||
cellArray[j][i] = data[j];
|
||||
}
|
||||
i++;
|
||||
}
|
||||
levelEditor.setCellArray(cellArray);
|
||||
|
||||