From fc35851f0f619fae27a815c59461ad3fc760e3a5 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Sun, 3 Mar 2019 15:34:08 -0800 Subject: [PATCH] Added some extra debugging for GameScreen hit check --- core/src/gdx/diablo/screen/GameScreen.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/gdx/diablo/screen/GameScreen.java b/core/src/gdx/diablo/screen/GameScreen.java index fae2d030..375d2e0e 100644 --- a/core/src/gdx/diablo/screen/GameScreen.java +++ b/core/src/gdx/diablo/screen/GameScreen.java @@ -67,8 +67,10 @@ import gdx.diablo.widget.TextArea; public class GameScreen extends ScreenAdapter implements LoadingScreen.Loadable { private static final String TAG = "GameScreen"; + private static final boolean DEBUG = true; private static final boolean DEBUG_TOUCHPAD = !true; private static final boolean DEBUG_MOBILE = true; + private static final boolean DEBUG_HIT = DEBUG && !true; final AssetDescriptor windowopenDescriptor = new AssetDescriptor<>("data\\global\\sfx\\cursor\\windowopen.wav", Sound.class); @@ -428,6 +430,7 @@ public class GameScreen extends ScreenAdapter implements LoadingScreen.Loadable stage.screenToStageCoordinates(tmpVec2.set(Gdx.input.getX(), Gdx.input.getY())); Actor hit = stage.hit(tmpVec2.x, tmpVec2.y, true); if (hit == null) mapListener.update(); + else if (DEBUG_HIT) Gdx.app.debug(TAG, hit.toString()); //if (Gdx.input.isButtonPressed(Input.Buttons.LEFT)) { // GridPoint2 coords = mapRenderer.coords(); // player.setPath(map, new Vector3(coords.x, coords.y, 0));