summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/zproject/engine/Camera.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/ch/asynk/zproject/engine/Camera.java b/core/src/ch/asynk/zproject/engine/Camera.java
index a3e13e1..35c149b 100644
--- a/core/src/ch/asynk/zproject/engine/Camera.java
+++ b/core/src/ch/asynk/zproject/engine/Camera.java
@@ -48,6 +48,14 @@ public class Camera extends OrthographicCamera
this.hudInvProjMatrix = new Matrix4();
}
+ public void setDimension(float boardWidth, float boardHeight)
+ {
+ setToOrtho(false, boardWidth, boardHeight);
+ this.boardWidth = boardWidth;
+ this.boardHeight = boardHeight;
+ this.boardAspectRatio = (boardWidth / boardHeight);
+ }
+
public void updateViewport(int screenWidth, int screenHeight)
{
this.screenWidth = screenWidth;