diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/screens/GameCamera.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/screens/GameCamera.java b/core/src/ch/asynk/tankontank/screens/GameCamera.java index 6b89e24..85e2233 100644 --- a/core/src/ch/asynk/tankontank/screens/GameCamera.java +++ b/core/src/ch/asynk/tankontank/screens/GameCamera.java @@ -13,8 +13,8 @@ public class GameCamera extends OrthographicCamera { private static final float ZEROF = 0.01f; - // private int screenWidth; - // private int screenHeight; + private int screenWidth; + private int screenHeight; private float zoomOut; private float zoomIn; private float widthFactor; @@ -35,8 +35,8 @@ public class GameCamera extends OrthographicCamera public void updateViewport(int screenWidth, int screenHeight) { - // this.screenWidth = screenWidth; - // this.screenHeight = screenHeight; + this.screenWidth = screenWidth; + this.screenHeight = screenHeight; float viewportAspect = (viewportWidth / viewportHeight); float aspect = (screenWidth / (float) screenHeight); @@ -72,6 +72,16 @@ public class GameCamera extends OrthographicCamera return hudMatrix; } + public int getScreenWidth() + { + return screenWidth; + } + + public int getScreenHeight() + { + return screenHeight; + } + public int getHudWidth() { return (int) window.width; |