Class ControllableCameraPrefab


@Components({CameraControlData.class,CameraData.class,Transform.class}) public class ControllableCameraPrefab extends CameraPrefab
  • Field Details

    • movementSpeed

      protected float movementSpeed
    • velocityDamping

      protected float velocityDamping
    • disableControlsOnPause

      protected boolean disableControlsOnPause
    • zoomSpeed

      protected float zoomSpeed
    • minZoom

      protected float minZoom
    • maxZoom

      protected float maxZoom
    • enableBounds

      protected boolean enableBounds
    • boundsX

      protected float boundsX
    • boundsY

      protected float boundsY
    • boundsWidth

      protected float boundsWidth
    • boundsHeight

      protected float boundsHeight
  • Constructor Details

    • ControllableCameraPrefab

      public ControllableCameraPrefab(float movementSpeed, float velocityDamping, float zoomSpeed, float minZoom, float maxZoom)
      Parameters:
      movementSpeed - Movement speed (Set to 0 to disable movement)
      velocityDamping - Velocity damping (Set to 0 to disable damping)
      zoomSpeed - Zoom speed (Set to 0 to disable zooming)
      minZoom - Minimum zoom factor
      maxZoom - Maximum zoom factor
  • Method Details

    • disableMovement

      public void disableMovement()
    • setMovementSpeed

      public void setMovementSpeed(float movementSpeed)
    • disableVelocityDamping

      public void disableVelocityDamping()
    • setVelocityDamping

      public void setVelocityDamping(float velocityDamping)
    • disableZoom

      public void disableZoom()
    • setZoom

      public void setZoom(float zoomSpeed, float minZoom, float maxZoom)
    • setZoomSpeed

      public void setZoomSpeed(float zoomSpeed)
    • setZoomRange

      public void setZoomRange(float minZoom, float maxZoom)
    • disableBounds

      public void disableBounds()
    • setBounds

      public void setBounds(float x, float y, float width, float height)
    • setDisableControlsOnPause

      public void setDisableControlsOnPause(boolean disableControlsOnPause)
    • apply

      protected void apply(Entity entity)
      Description copied from class: Prefab
      Adds this prefab's predefined components to a given entity and copies values from this prefab.
      Overrides:
      apply in class CameraPrefab