Package com.csse3200.game.components
Class CameraZoomComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.CameraZoomComponent
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
create()
Called when the entity is created and registered.void
setMaxZoom
(float maxZoom) Set the maximum amount that the camera can zoom outvoid
setMinZoom
(float minZoom) Set the minimum amount that the camera can zoom invoid
zoom
(float amountX, float amountY) Zooms the camera in or out depending on the value of amountYMethods inherited from class com.csse3200.game.components.Component
dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
CameraZoomComponent
public CameraZoomComponent()
-
-
Method Details
-
create
public void create()Description copied from class:Component
Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished. -
setMaxZoom
public void setMaxZoom(float maxZoom) Set the maximum amount that the camera can zoom out- Parameters:
maxZoom
- the maximum camera zoom amount
-
setMinZoom
public void setMinZoom(float minZoom) Set the minimum amount that the camera can zoom in- Parameters:
minZoom
- the minimum camera zoom amount
-
zoom
public void zoom(float amountX, float amountY) Zooms the camera in or out depending on the value of amountY- Parameters:
amountX
- the horizontal zoom amountamountY
- the vertical zoom amount
-