1
0
mirror of https://github.com/Klagarge/PokeHES.git synced 2025-07-07 17:01:10 +00:00

change the world

This commit is contained in:
Fastium
2022-06-14 01:14:54 +02:00
parent 08e2a1eed2
commit ccf38809b9
9 changed files with 62 additions and 30 deletions

View File

@ -7,6 +7,7 @@ import Text.TextEnemy;
public class Battle {
private Enemy e;
public TextEnemy textEnemy;
private int lineSpeech;
public int answer;
@ -16,9 +17,11 @@ public class Battle {
public boolean screenBattleOn = true;
public Battle(Enemy e){
textEnemy = new TextEnemy("enemi"); // should be enemy.name
textEnemy.generateText();
if(e != null){
textEnemy = new TextEnemy(e);
textEnemy.generateText();
}
lineSpeech = 0;
newXp = 0;
@ -76,7 +79,10 @@ public class Battle {
}
public String getLine(){
if(e==null) return null;
return textEnemy.lines.get(lineSpeech).line;
}
@ -91,4 +97,8 @@ public class Battle {
public int getNewXp(){
return newXp;
}
public void setEnemy(Enemy e){
this.e = e;
}
}