From 429a3316d96338adcbc7f585c3e4610d32bdc3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Thu, 16 Jun 2022 07:38:35 +0200 Subject: [PATCH] polish merge --- src/Main/PokeMudry.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/Main/PokeMudry.java b/src/Main/PokeMudry.java index 48a111b..632cb73 100644 --- a/src/Main/PokeMudry.java +++ b/src/Main/PokeMudry.java @@ -70,26 +70,20 @@ public class PokeMudry extends PortableApplication { if (sp.p.onEnemy && onMapScreen){ sp.e = sp.p.lastEnemy; - sp.sb = sp.screenManager.getScreenBattle(); - if(sp.e == null) System.out.println("sdfsdfsdfsdf"); - - sp.b = new Battle(sp.e); - - //set pv and xp to display - sp.b.setXpPlayer(sp.p.getXp()); - - g.resetCamera(); - int pv = sp.e.getPv(); if (pv>0) { sp.sb = sp.screenManager.getScreenBattle(); sp.b = new Battle(sp.e); + + //set pv and xp to display + sp.b.setXpPlayer(sp.p.getXp()); + g.resetCamera(); } else { sp.p.onEnemy = false; } - + } if(onBattleScreen) sp.sb.manage(controller, sp.b);