mirror of
https://github.com/Klagarge/PokeHES.git
synced 2025-10-30 11:19:17 +00:00
ok
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user