1
0
mirror of https://github.com/Klagarge/PokeHES.git synced 2025-07-07 17:01:10 +00:00
This commit is contained in:
2022-06-12 12:10:57 +02:00
parent d33945ccf4
commit c121320a04
6 changed files with 125 additions and 71 deletions

View File

@ -1,14 +1,40 @@
package Game;
import Entity.Enemy;
import Text.TextEnemy;
public class Battle {
//TODO faire la logique du combat :$
/*
* les points
* réponses juste
* barre de vie
*/
private Enemy enemy;
TextEnemy textEnemy;
public int lineSpeech = 0;
public int answer = 0;
private boolean c;
public Battle(Enemy enemy){
this.enemy = enemy;
textEnemy = new TextEnemy("enemi"); // should be enemy.name
textEnemy.generateText();
//initialize the first line
System.out.println("lll : "+ getLine());
}
public void readNextLine(){
//change line
lineSpeech++;
}
public boolean getAttackOn(){
return textEnemy.lines.get(lineSpeech).attackOn;
}
public String getLine(){
return textEnemy.lines.get(lineSpeech).line;
}
}