mirror of
https://github.com/Klagarge/PokeHES.git
synced 2024-11-23 01:43:28 +00:00
a
This commit is contained in:
parent
26a8b0280b
commit
997f303567
@ -75,16 +75,17 @@ public class PokeMudry extends PortableApplication {
|
||||
|
||||
//manage battle
|
||||
if(!sp.b.getScreenBattleOn()){
|
||||
sp.p.addXp(sp.b.getNewXp());
|
||||
sp.e.removedPv(sp.b.getNewXp());
|
||||
sp.b.setPvEnemy(sp.e.getPv());
|
||||
sp.b.setXpPlayer(sp.p.getXp());
|
||||
}
|
||||
|
||||
|
||||
if(!sp.b.getScreenBattleOn() && onBattleScreen){
|
||||
sp.p.onEnemy = false;
|
||||
sp.sm = sp.screenManager.getScreenMap();
|
||||
sp.p.addXp(sp.b.getNewXp());
|
||||
sp.e.removedPv(sp.b.getNewXp());
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Graphics render
|
||||
|
45
src/Screen/ScreenPlayer-MSI.java
Normal file
45
src/Screen/ScreenPlayer-MSI.java
Normal file
@ -0,0 +1,45 @@
|
||||
package Screen;
|
||||
|
||||
import Entity.Enemy;
|
||||
import Entity.Player;
|
||||
import Game.Battle;
|
||||
import ch.hevs.gdx2d.lib.GdxGraphics;
|
||||
|
||||
public class ScreenPlayer {
|
||||
public ManagerOfScreen screenManager = new ManagerOfScreen();
|
||||
public Player p = null;
|
||||
public Enemy e = null;
|
||||
public Battle b = null;
|
||||
public ScreenMap sm = null;
|
||||
public ScreenBattle sb = null;
|
||||
|
||||
public void init(){
|
||||
|
||||
// One player by ScreenPlayer
|
||||
p = new Player(8, 15, "desert");
|
||||
//p = new Player(4, 2, "21RI");
|
||||
|
||||
b = new Battle(new Enemy("enemi", 0, 0, "charachter", "desert", 50, "enemi"));
|
||||
|
||||
// Create both type of screen and record for reuse
|
||||
screenManager.registerScreen(ScreenMap.class);
|
||||
screenManager.registerScreen(ScreenBattle.class);
|
||||
sb = screenManager.getScreenBattle();
|
||||
sm = screenManager.getScreenMap();
|
||||
|
||||
}
|
||||
|
||||
public void render(GdxGraphics g){
|
||||
if(sm != null){
|
||||
sm.setPlayer(p);
|
||||
}
|
||||
|
||||
if(sb != null){
|
||||
sb.setBattle(b);
|
||||
b.setEnemy(e);
|
||||
}
|
||||
|
||||
screenManager.render(g);
|
||||
}
|
||||
|
||||
}
|
@ -17,7 +17,7 @@ public class ScreenPlayer {
|
||||
|
||||
// One player by ScreenPlayer
|
||||
p = new Player(8, 15, "desert");
|
||||
//p = new Player(4, 2, "21RI");
|
||||
// = new Player(4, 2, "21RI");
|
||||
|
||||
b = new Battle(new Enemy("enemi", 0, 0, "charachter", "desert", 50, "enemi"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user