diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-30 12:46:09 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-30 12:46:09 +0200 |
commit | 436bae7aabd29cfa8359d7e887422e0f8423ff27 (patch) | |
tree | a4b7a06e6124133aa370846af01c0ec288872ea3 /core/src/ch/asynk | |
parent | a0273d8e7e4f589d68e0147e00f2c63c1ba7f2e0 (diff) | |
download | RustAndDust-436bae7aabd29cfa8359d7e887422e0f8423ff27.zip RustAndDust-436bae7aabd29cfa8359d7e887422e0f8423ff27.tar.gz |
GameScreen: ZOOM_MAX - >ZOOM_IN_MAX
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/screens/GameScreen.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/screens/GameScreen.java b/core/src/ch/asynk/tankontank/screens/GameScreen.java index b2222d6..6abe348 100644 --- a/core/src/ch/asynk/tankontank/screens/GameScreen.java +++ b/core/src/ch/asynk/tankontank/screens/GameScreen.java @@ -40,7 +40,7 @@ public class GameScreen implements Screen { private static final boolean DEBUG = false; - private static final float ZOOM_MAX = 0.2f; + private static final float ZOOM_IN_MAX = 0.2f; private static final float ZOOM_GESTURE_FACTOR = .01f; private static final float ZOOM_SCROLL_FACTOR = .1f; private static final int DRAGGED_Z_INDEX = 10; @@ -126,7 +126,7 @@ public class GameScreen implements Screen cam.zoom += ZOOM_GESTURE_FACTOR; else cam.zoom -= ZOOM_GESTURE_FACTOR; - cam.zoom = MathUtils.clamp(cam.zoom, ZOOM_MAX, maxZoomOut); + cam.zoom = MathUtils.clamp(cam.zoom, ZOOM_IN_MAX, maxZoomOut); clampCameraPos(); return true; } @@ -170,7 +170,7 @@ public class GameScreen implements Screen public boolean scrolled(int amount) { cam.zoom += amount * ZOOM_SCROLL_FACTOR; - cam.zoom = MathUtils.clamp(cam.zoom, ZOOM_MAX, maxZoomOut); + cam.zoom = MathUtils.clamp(cam.zoom, ZOOM_IN_MAX, maxZoomOut); clampCameraPos(); return true; } @@ -224,7 +224,7 @@ public class GameScreen implements Screen hud.getViewport().update(width, height, true); mapViewport.update(width, height); maxZoomOut = Math.min((map.getWidth() / cam.viewportWidth), (map.getHeight() / cam.viewportHeight)); - cam.zoom = MathUtils.clamp(cam.zoom, ZOOM_MAX, maxZoomOut); + cam.zoom = MathUtils.clamp(cam.zoom, ZOOM_IN_MAX, maxZoomOut); screenToViewport.set((cam.viewportWidth / width), (cam.viewportHeight / height)); } |