mirror of
https://github.com/Klagarge/PokeHES.git
synced 2024-11-23 09:53:28 +00:00
commit
67ccb8cca4
@ -19,6 +19,7 @@ public class Controller {
|
|||||||
keyStatus.put(Input.Keys.NUM_3, false);
|
keyStatus.put(Input.Keys.NUM_3, false);
|
||||||
keyStatus.put(Input.Keys.NUM_4, false);
|
keyStatus.put(Input.Keys.NUM_4, false);
|
||||||
keyStatus.put(Input.Keys.SPACE, false);
|
keyStatus.put(Input.Keys.SPACE, false);
|
||||||
|
keyStatus.put(Input.Keys.ENTER, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,10 @@ public class Battle {
|
|||||||
|
|
||||||
public void readNextLine(){
|
public void readNextLine(){
|
||||||
//change line
|
//change line
|
||||||
lineSpeech++;
|
System.out.println(textEnemy.lines.size());
|
||||||
|
if(lineSpeech < textEnemy.lines.size()-1){
|
||||||
|
lineSpeech++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//check the choice answer
|
//check the choice answer
|
||||||
@ -66,6 +68,11 @@ public class Battle {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public boolean finish(){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean getAttackOn(){
|
public boolean getAttackOn(){
|
||||||
return textEnemy.lines.get(lineSpeech).attackOn;
|
return textEnemy.lines.get(lineSpeech).attackOn;
|
||||||
}
|
}
|
||||||
|
@ -71,6 +71,12 @@ public class PokeMudry extends PortableApplication {
|
|||||||
|
|
||||||
if(onBattleScreen) sp.sb.manage(controller, sp.b);
|
if(onBattleScreen) sp.sb.manage(controller, sp.b);
|
||||||
|
|
||||||
|
|
||||||
|
if(!sp.sb.getScreenBattleOn() && onBattleScreen){
|
||||||
|
sp.p.onEnemy = false;
|
||||||
|
sp.sm = sp.screenManager.getScreenMap();
|
||||||
|
}
|
||||||
|
|
||||||
// Graphics render
|
// Graphics render
|
||||||
sp.render(g);
|
sp.render(g);
|
||||||
for (Entity entity : entities) {
|
for (Entity entity : entities) {
|
||||||
|
@ -31,6 +31,8 @@ public class ScreenBattle extends RenderingScreen{
|
|||||||
private Enemy enemy;
|
private Enemy enemy;
|
||||||
|
|
||||||
|
|
||||||
|
private boolean screenBattleOn = true;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInit() {
|
public void onInit() {
|
||||||
//display the question
|
//display the question
|
||||||
@ -94,6 +96,10 @@ public class ScreenBattle extends RenderingScreen{
|
|||||||
//TODO afficher le joueur
|
//TODO afficher le joueur
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean getScreenBattleOn(){
|
||||||
|
return screenBattleOn;
|
||||||
|
}
|
||||||
|
|
||||||
public void manage(Controller c, Battle battle){
|
public void manage(Controller c, Battle battle){
|
||||||
if(PokeMudry.front_montant){
|
if(PokeMudry.front_montant){
|
||||||
System.out.println("manage: " + battle.getLineSpeech());
|
System.out.println("manage: " + battle.getLineSpeech());
|
||||||
@ -103,6 +109,9 @@ public class ScreenBattle extends RenderingScreen{
|
|||||||
System.out.println("in");
|
System.out.println("in");
|
||||||
battle.readNextLine();
|
battle.readNextLine();
|
||||||
}
|
}
|
||||||
|
if (c.keyStatus.get(Input.Keys.ENTER)){
|
||||||
|
screenBattleOn = battle.finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(battle.getAttackOn() == true){
|
if(battle.getAttackOn() == true){
|
||||||
|
@ -21,6 +21,7 @@ public class ScreenPlayer {
|
|||||||
// Create both type of screen and record for reuse
|
// Create both type of screen and record for reuse
|
||||||
screenManager.registerScreen(ScreenMap.class);
|
screenManager.registerScreen(ScreenMap.class);
|
||||||
screenManager.registerScreen(ScreenBattle.class);
|
screenManager.registerScreen(ScreenBattle.class);
|
||||||
|
sb = screenManager.getScreenBattle();
|
||||||
sm = screenManager.getScreenMap();
|
sm = screenManager.getScreenMap();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user