Class ControllableCameraPrefab
java.lang.Object
dev.prozilla.pine.core.entity.prefab.Prefab
dev.prozilla.pine.core.entity.prefab.camera.CameraPrefab
dev.prozilla.pine.core.entity.prefab.camera.ControllableCameraPrefab
@Components({CameraControlData.class,CameraData.class,Transform.class})
public class ControllableCameraPrefab
extends CameraPrefab
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected float
protected float
protected float
protected float
protected boolean
protected boolean
protected float
protected float
protected float
protected float
protected float
Fields inherited from class dev.prozilla.pine.core.entity.prefab.camera.CameraPrefab
backgroundColor
-
Constructor Summary
ConstructorsConstructorDescriptionControllableCameraPrefab
(float movementSpeed, float velocityDamping, float zoomSpeed, float minZoom, float maxZoom) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds this prefab's predefined components to a given entity and copies values from this prefab.void
void
void
void
void
setBounds
(float x, float y, float width, float height) void
setDisableControlsOnPause
(boolean disableControlsOnPause) void
setMovementSpeed
(float movementSpeed) void
setVelocityDamping
(float velocityDamping) void
setZoom
(float zoomSpeed, float minZoom, float maxZoom) void
setZoomRange
(float minZoom, float maxZoom) void
setZoomSpeed
(float zoomSpeed) Methods inherited from class dev.prozilla.pine.core.entity.prefab.camera.CameraPrefab
setBackgroundColor
Methods inherited from class dev.prozilla.pine.core.entity.prefab.Prefab
instantiate, instantiate, setActive, setName, setTag
-
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 to0
to disable movement)velocityDamping
- Velocity damping (Set to0
to disable damping)zoomSpeed
- Zoom speed (Set to0
to disable zooming)minZoom
- Minimum zoom factormaxZoom
- 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
Description copied from class:Prefab
Adds this prefab's predefined components to a given entity and copies values from this prefab.- Overrides:
apply
in classCameraPrefab
-