diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-30 16:34:30 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-30 16:34:30 +0200 |
commit | b85879c878bbf7cae47f1ab2722af7e07f00dd93 (patch) | |
tree | c6569c45a19dd7229f1c7f1d7825bc675066e91a /core | |
parent | 5add1674ee031eaada9d19d07dde5efbd071b4f0 (diff) | |
download | RustAndDust-b85879c878bbf7cae47f1ab2722af7e07f00dd93.zip RustAndDust-b85879c878bbf7cae47f1ab2722af7e07f00dd93.tar.gz |
GameScreen: nothing really
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/screens/GameScreen.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/screens/GameScreen.java b/core/src/ch/asynk/tankontank/screens/GameScreen.java index 2669e70..371eaa7 100644 --- a/core/src/ch/asynk/tankontank/screens/GameScreen.java +++ b/core/src/ch/asynk/tankontank/screens/GameScreen.java @@ -232,10 +232,12 @@ public class GameScreen implements Screen public void resize(int width, int height) { // Gdx.app.debug("GameScreen", "resize (" + width + "," + height + ")"); - hud.getViewport().update(width, height, true); + hud.getViewport().update(width, height); mapViewport.update(width, height); + maxZoomOut = Math.min((map.getWidth() / cam.viewportWidth), (map.getHeight() / cam.viewportHeight)); cam.zoom = MathUtils.clamp(cam.zoom, ZOOM_IN_MAX, maxZoomOut); + screenToViewport.set((cam.viewportWidth / width), (cam.viewportHeight / height)); } |