Class CameraZoomComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.CameraZoomComponent

public class CameraZoomComponent extends Component
  • 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.
      Overrides:
      create in class Component
    • 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 amount
      amountY - the vertical zoom amount