fixed dialogs

This commit is contained in:
musilto9 2020-04-20 18:30:46 +02:00
parent 0bcb8fe0b9
commit 25a20341ea
3 changed files with 14 additions and 15 deletions

View File

@ -35,21 +35,23 @@ public class InteractionCell extends Cell {
public void startEvent() { public void startEvent() {
if (message != null) { if (message != null) {
window.setCanPersonMove(false); if (message.equals("error")) {
readDialogFile(message); final int[] i = {0};
timer = new Timer(1000, actionEvent -> {
errorEvent(i[0] +1);
i[0]++;
});
timer.start();
readDialogFile(message);
}
else {
window.setCanPersonMove(false);
readDialogFile(message);
}
} }
} }
public void readDialogFile(String name) { public void readDialogFile(String name) {
if (message.equals("error")) {
final int[] i = {0};
timer = new Timer(1000, actionEvent -> {
errorEvent(i[0] +1);
i[0]++;
});
timer.start();
return;
}
try { try {
File dialogFile = new File("src/main/resources/dialogs/" + name + ".txt"); File dialogFile = new File("src/main/resources/dialogs/" + name + ".txt");
scanner = new Scanner(dialogFile); scanner = new Scanner(dialogFile);

View File

@ -0,0 +1 @@
<end>

View File

@ -1,7 +1,3 @@
<image> boy3-face.png <image> boy3-face.png
*slaps rack*<br/>this bad boy can fit so many minecraft servers *slaps rack*<br/>this bad boy can fit so many minecraft servers
<foreground> error
<image> null
Shit..
<foreground> null
<end> <end>