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 floatprotected floatprotected floatprotected floatprotected booleanprotected booleanprotected floatprotected floatprotected floatprotected floatprotected floatFields 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 voidAdds this prefab's predefined components to a given entity and copies values from this prefab.voidvoidvoidvoidvoidsetBounds(float x, float y, float width, float height) voidsetDisableControlsOnPause(boolean disableControlsOnPause) voidsetMovementSpeed(float movementSpeed) voidsetVelocityDamping(float velocityDamping) voidsetZoom(float zoomSpeed, float minZoom, float maxZoom) voidsetZoomRange(float minZoom, float maxZoom) voidsetZoomSpeed(float zoomSpeed) Methods inherited from class dev.prozilla.pine.core.entity.prefab.camera.CameraPrefab
setBackgroundColorMethods inherited from class dev.prozilla.pine.core.entity.prefab.Prefab
addChild, addChildren, addChildren, instantiate, instantiate, removeChild, 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 to0to disable movement)velocityDamping- Velocity damping (Set to0to disable damping)zoomSpeed- Zoom speed (Set to0to 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:PrefabAdds this prefab's predefined components to a given entity and copies values from this prefab.- Overrides:
applyin classCameraPrefab
-