From 4e374c946d450976869f4edc020af1671eae565d Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Sun, 20 Oct 2019 17:15:35 -0700 Subject: [PATCH] Set conditional for debug rendering to improve performance on mobile --- core/src/com/riiablo/screen/GameScreen.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/com/riiablo/screen/GameScreen.java b/core/src/com/riiablo/screen/GameScreen.java index a68613f5..a1672a57 100644 --- a/core/src/com/riiablo/screen/GameScreen.java +++ b/core/src/com/riiablo/screen/GameScreen.java @@ -592,11 +592,13 @@ public class GameScreen extends ScreenAdapter implements LoadingScreen.Loadable mapRenderer.draw(delta); b.end(); - Riiablo.shapes.setAutoShapeType(true); - Riiablo.shapes.begin(ShapeRenderer.ShapeType.Line); - mapRenderer.drawDebug(Riiablo.shapes); - mapRenderer.drawDebugPath(Riiablo.shapes, player.path()); - Riiablo.shapes.end(); + if (Gdx.app.getType() == Application.ApplicationType.Desktop) { + Riiablo.shapes.setAutoShapeType(true); + Riiablo.shapes.begin(ShapeRenderer.ShapeType.Line); + mapRenderer.drawDebug(Riiablo.shapes); + mapRenderer.drawDebugPath(Riiablo.shapes, player.path()); + Riiablo.shapes.end(); + } b.setProjectionMatrix(viewport.getCamera().combined);