mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-22 20:48:55 +07:00
MapListener will no longer react if cursor is over a stage component
This commit is contained in:
parent
0bba0ccb16
commit
d23b151149
@ -106,6 +106,8 @@ public class GameScreen extends ScreenAdapter implements LoadingScreen.Loadable
|
|||||||
PrintWriter out;
|
PrintWriter out;
|
||||||
BufferedReader in;
|
BufferedReader in;
|
||||||
|
|
||||||
|
private static final Vector2 tmpVec2 = new Vector2();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Array<AssetDescriptor> getDependencies() {
|
public Array<AssetDescriptor> getDependencies() {
|
||||||
Array<AssetDescriptor> dependencies = new Array<>();
|
Array<AssetDescriptor> dependencies = new Array<>();
|
||||||
@ -419,7 +421,9 @@ public class GameScreen extends ScreenAdapter implements LoadingScreen.Loadable
|
|||||||
//System.out.println("hit " + hit + "; " + collision.point + "; " + collision.normal);
|
//System.out.println("hit " + hit + "; " + collision.point + "; " + collision.normal);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mapListener.update();
|
stage.screenToStageCoordinates(tmpVec2.set(Gdx.input.getX(), Gdx.input.getY()));
|
||||||
|
Actor hit = stage.hit(tmpVec2.x, tmpVec2.y, false);
|
||||||
|
if (hit == null) mapListener.update();
|
||||||
//if (Gdx.input.isButtonPressed(Input.Buttons.LEFT)) {
|
//if (Gdx.input.isButtonPressed(Input.Buttons.LEFT)) {
|
||||||
// GridPoint2 coords = mapRenderer.coords();
|
// GridPoint2 coords = mapRenderer.coords();
|
||||||
// player.setPath(map, new Vector3(coords.x, coords.y, 0));
|
// player.setPath(map, new Vector3(coords.x, coords.y, 0));
|
||||||
|
Loading…
Reference in New Issue
Block a user