diff --git a/src/Main/PokeMudry.java b/src/Main/PokeMudry.java index f057f66..4ff97e1 100644 --- a/src/Main/PokeMudry.java +++ b/src/Main/PokeMudry.java @@ -2,11 +2,8 @@ package Main; import java.util.Vector; -import java.util.Map.Entry; - -import org.lwjgl.opencl.CLSampler; - import com.badlogic.gdx.Input; + import Control.Controller; import Entity.Enemy; import Entity.Entity; @@ -67,7 +64,6 @@ public class PokeMudry extends PortableApplication { // Switch screen if (sp.p.frontOfEnemy && onMapScreen){ sp.e = sp.p.lastEnemy; - //sp.screenManager.activateNextScreen(); sp.sb = sp.screenManager.getScreenBattle(); sp.b = new Battle(sp.e); g.resetCamera(); diff --git a/src/Screen/ScreenBattle.java b/src/Screen/ScreenBattle.java index c8d79a6..4a7e812 100644 --- a/src/Screen/ScreenBattle.java +++ b/src/Screen/ScreenBattle.java @@ -1,8 +1,5 @@ package Screen; -import ch.hevs.gdx2d.components.screen_management.RenderingScreen; -import ch.hevs.gdx2d.lib.GdxGraphics; - import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input; import com.badlogic.gdx.files.FileHandle; @@ -10,16 +7,15 @@ import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator; import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.FreeTypeFontParameter; -import com.badlogic.gdx.utils.Align; import Control.Controller; import Entity.Enemy; import Entity.Player; import Game.Battle; -import Text.Line; -import Text.TextEnemy; import Main.PokeMudry; import Main.Settings; +import ch.hevs.gdx2d.components.screen_management.RenderingScreen; +import ch.hevs.gdx2d.lib.GdxGraphics; public class ScreenBattle extends RenderingScreen{ @@ -37,9 +33,6 @@ public class ScreenBattle extends RenderingScreen{ @Override public void onInit() { - //new battle game - //battle = new Battle(enemy); - //display the question generateFont("resources/font/OptimusPrinceps.ttf", 40, Color.BLACK); @@ -83,7 +76,6 @@ public class ScreenBattle extends RenderingScreen{ g.drawFilledRectangle(Settings.SIDE/2, HEIGHT_DIALOG/2 + EDGE, WIDTH_DIALOG, HEIGHT_DIALOG, 0); //dialog - if(b != null) g.drawString(15, 245 ,b.getLine() , optimus40); diff --git a/src/Screen/ScreenPlayer.java b/src/Screen/ScreenPlayer.java index 6eb5ddc..34df2f4 100644 --- a/src/Screen/ScreenPlayer.java +++ b/src/Screen/ScreenPlayer.java @@ -26,7 +26,9 @@ public class ScreenPlayer { } public void render(GdxGraphics g){ - sm.setPlayer(p); + if(sm != null){ + sm.setPlayer(p); + } if(sb != null){ sb.setEnemy(e);