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

xp modification

This commit is contained in:
Fastium
2022-06-15 09:53:54 +02:00
parent 997f303567
commit b944d9be51
5 changed files with 50 additions and 83 deletions

View File

@@ -35,6 +35,7 @@ public class ScreenBattle extends RenderingScreen{
//display the question
generateFont("resources/font/OptimusPrinceps.ttf", 40, Color.BLACK);
}
@@ -98,14 +99,21 @@ public class ScreenBattle extends RenderingScreen{
public void manage(Controller c, Battle battle){
if(PokeMudry.front_montant){
System.out.println("manage: " + battle.getLineSpeech());
if( battle.getAttackOn() == false){
if (c.keyStatus.get(Input.Keys.SPACE)){
if(battle.getLineSpeech() <= 5){
if(battle.getLineSpeech() == 4){
//dislpay the finish speech
battle.FinishSpeech();
}
else if(battle.getLineSpeech() > 4){
//return in the map
battle.screenBattleOn = battle.finish();
}
else{
System.out.println("in");
//fix next line
battle.readNextLine();
}
@@ -117,19 +125,15 @@ public class ScreenBattle extends RenderingScreen{
if(battle.getAttackOn() == true){
if (c.keyStatus.get(Input.Keys.NUM_1)){
battle.checkAnswer(1);
}
else if (c.keyStatus.get(Input.Keys.NUM_2)){
battle.checkAnswer(2);
}
else if (c.keyStatus.get(Input.Keys.NUM_3)){
battle.checkAnswer(3);
}
else if (c.keyStatus.get(Input.Keys.NUM_4)){
battle.checkAnswer(4);
}