mirror of
https://github.com/Klagarge/PokeHES.git
synced 2024-11-30 04:33:27 +00:00
a
This commit is contained in:
parent
05e9e4d7ef
commit
ba0f36625e
@ -53,8 +53,8 @@ public class PokeMudry extends PortableApplication {
|
|||||||
public void onGraphicRender(GdxGraphics g) {
|
public void onGraphicRender(GdxGraphics g) {
|
||||||
g.clear();
|
g.clear();
|
||||||
sp.p.manageEntity(sp.sm, controller);
|
sp.p.manageEntity(sp.sm, controller);
|
||||||
|
sp.sb.manage(controller);
|
||||||
sp.render(g);
|
sp.render(g);
|
||||||
System.out.println(sp.screenManager.getActiveScreen().getClass());
|
|
||||||
//System.out.println(ScreenMap.class);
|
//System.out.println(ScreenMap.class);
|
||||||
for (Entity entity : entities) {
|
for (Entity entity : entities) {
|
||||||
|
|
||||||
@ -64,7 +64,6 @@ public class PokeMudry extends PortableApplication {
|
|||||||
|
|
||||||
if (sp.p.frontOfEnemy && sp.screenManager.getActiveScreen().getClass().equals(ScreenMap.class)){
|
if (sp.p.frontOfEnemy && sp.screenManager.getActiveScreen().getClass().equals(ScreenMap.class)){
|
||||||
sp.e = sp.p.lastEnemy;
|
sp.e = sp.p.lastEnemy;
|
||||||
System.out.println("switch screen");
|
|
||||||
sp.screenManager.activateNextScreen();
|
sp.screenManager.activateNextScreen();
|
||||||
g.resetCamera();
|
g.resetCamera();
|
||||||
}
|
}
|
||||||
|
@ -25,10 +25,6 @@ public class ScreenBattle extends RenderingScreen{
|
|||||||
private static int EDGE = 10;
|
private static int EDGE = 10;
|
||||||
private static int HEIGHT_DIALOG = Settings.SIDE / 3;
|
private static int HEIGHT_DIALOG = Settings.SIDE / 3;
|
||||||
private static int WIDTH_DIALOG = Settings.SIDE - 2*EDGE;
|
private static int WIDTH_DIALOG = Settings.SIDE - 2*EDGE;
|
||||||
private Enemy e;
|
|
||||||
|
|
||||||
private boolean attackOn;
|
|
||||||
private int numAttack =0;
|
|
||||||
|
|
||||||
|
|
||||||
private BitmapFont optimus40;
|
private BitmapFont optimus40;
|
||||||
@ -62,6 +58,8 @@ public class ScreenBattle extends RenderingScreen{
|
|||||||
|
|
||||||
displayDialog(g);
|
displayDialog(g);
|
||||||
|
|
||||||
|
System.out.println(textEnemy.lines.get(lineSpeech).attackOn);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,12 +90,9 @@ public class ScreenBattle extends RenderingScreen{
|
|||||||
g.drawString(15, 245 ,lineDialog , optimus40);
|
g.drawString(15, 245 ,lineDialog , optimus40);
|
||||||
|
|
||||||
}
|
}
|
||||||
public void setEnemy(Enemy e) {
|
|
||||||
this.e = e;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void displayEnemy(Enemy e){
|
public void displayEnemy(Enemy e){
|
||||||
// stock his speech
|
// TODO affficher l'enemi
|
||||||
}
|
}
|
||||||
|
|
||||||
public void displayPlayer(Player p){
|
public void displayPlayer(Player p){
|
||||||
@ -113,6 +108,7 @@ public class ScreenBattle extends RenderingScreen{
|
|||||||
|
|
||||||
public void manage(Controller c){
|
public void manage(Controller c){
|
||||||
if (c.keyStatus.get(Input.Keys.SPACE)){
|
if (c.keyStatus.get(Input.Keys.SPACE)){
|
||||||
|
|
||||||
if(textEnemy.lines.get(lineSpeech).attackOn == false){
|
if(textEnemy.lines.get(lineSpeech).attackOn == false){
|
||||||
readNextLine();
|
readNextLine();
|
||||||
}
|
}
|
||||||
@ -136,7 +132,7 @@ public class ScreenBattle extends RenderingScreen{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (c.keyStatus.get(Input.Keys.NUM_4)){
|
if (c.keyStatus.get(Input.Keys.NUM_4)){
|
||||||
if(textEnemy.lines.get(lineSpeech).attackOn == false){
|
if(textEnemy.lines.get(lineSpeech).attackOn == true){
|
||||||
readNextLine();
|
readNextLine();
|
||||||
answer = 4;
|
answer = 4;
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ public class ScreenPlayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void render(GdxGraphics g){
|
public void render(GdxGraphics g){
|
||||||
sb.setEnemy(e);
|
sb.displayEnemy(e);
|
||||||
sm.setPlayer(p);
|
sm.setPlayer(p);
|
||||||
screenManager.render(g);
|
screenManager.render(g);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user