Class CamMan
java.lang.Object
group24.escaperoom.screens.editor.CamMan
A manager for your camera
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetPosition(float x, float y) Set the position of the camera absolutelyvoidsetZoom(float zoom) Set the zoom to a particular value.voidtranslate(float dx, float dy) Set the position of the camera absolutelyvoidtranslate(CamMan.Translation translation) com.badlogic.gdx.math.Vector2unproject(float x, float y) voidzoomIn()Zoom in...voidzoomOut()Zoom out...
-
Constructor Details
-
CamMan
public CamMan(com.badlogic.gdx.graphics.OrthographicCamera camera) - Parameters:
camera- to manage
-
-
Method Details
-
unproject
public com.badlogic.gdx.math.Vector2 unproject(float x, float y) - Parameters:
x- coordy- coord- Returns:
- the unprojected vector
-
translate
public void translate(float dx, float dy) Set the position of the camera absolutely- Parameters:
dx- amountdy- amount
-
setPosition
public void setPosition(float x, float y) Set the position of the camera absolutely- Parameters:
x- coordy- coord
-
translate
- Parameters:
translation- direction to move
-
setZoom
public void setZoom(float zoom) Set the zoom to a particular value. The value will still be clamped to minimum and maximums -
zoomOut
public void zoomOut()Zoom out... -
zoomIn
public void zoomIn()Zoom in...
-