1
0
mirror of https://github.com/Klagarge/PokeHES.git synced 2025-10-30 11:19:17 +00:00
This commit is contained in:
Fastium
2022-06-16 23:29:36 +02:00
parent 3e96178c0f
commit 790fd9d4ec
9 changed files with 51 additions and 178 deletions

View File

@@ -10,7 +10,6 @@ public class SpeechData {
Vector<String> speechs = new Vector<String>();
File file;
public SpeechData(String name){
file = new File("./Data/Battle/Speech/" + name + ".txt");
@@ -18,15 +17,15 @@ public class SpeechData {
public void readFile() {
String line = "";
// try to read the file of the speech of the enemy
try {
FileReader f = new FileReader(file, StandardCharsets.UTF_8);
BufferedReader bf = new BufferedReader(f);
//read and add a new line in the vector speechs
line = bf.readLine();
while(line != null){
speechs.add(line);
line = bf.readLine();
}
@@ -37,6 +36,7 @@ public class SpeechData {
}
}
//return the element i an teh vector speechs
public String getSpeechs(int i) {
return speechs.elementAt(i);
}