PopochiuMainCamera
Extends: Camera2D
Description
Property Descriptions
is_shaking
var is_shaking: bool = false
tween
var tween: Tween = null
default_limits
var default_limits: Dictionary
Method Descriptions
queue_change_offset
func queue_change_offset(offset: Vector2 = "(0, 0)") -> Callable
Changes the main camera's offset by [param offset] pixels. This method is intended to be used inside a [method queue] of instructions.
change_offset
func change_offset(offset: Vector2 = "(0, 0)") -> void
Changes the main camera's offset by [param offset] pixels. Useful when zooming the camera.
queue_shake
func queue_shake(strength: float = 1, duration: float = 1) -> Callable
Makes the camera shake with [param strength] during [param duration] seconds. This method is intended to be used inside a [method queue] of instructions.
shake
func shake(strength: float = 1, duration: float = 1) -> void
Makes the camera shake with [param strength] during [param duration] seconds.
queue_shake_bg
func queue_shake_bg(strength: float = 1, duration: float = 1) -> Callable
Makes the camera shake with [param strength] during [param duration] seconds without blocking excecution (that means it runs in the background). This method is intended to be used inside a [method queue] of instructions.
shake_bg
func shake_bg(strength: float = 1, duration: float = 1) -> void
Makes the camera shake with [param strength] during [param duration] seconds without blocking excecution (that means it runs in the background).
queue_change_zoom
func queue_change_zoom(target: Vector2 = "(1, 1)", duration: float = 1) -> Callable
Changes the camera zoom. If [param target] is greater than [code]Vector2(1, 1)[/code] the camera will [b]zoom out[/b], smaller values will make it [b]zoom in[/b]. The effect will last [param duration] seconds. This method is intended to be used inside a [method queue] of instructions.
change_zoom
func change_zoom(target: Vector2 = "(1, 1)", duration: float = 1) -> void
Changes the camera zoom. If [param target] is greater than [code]Vector2(1, 1)[/code] the camera will [b]zoom out[/b], smaller values will make it [b]zoom in[/b]. The effect will last [param duration] seconds.
stop_shake
func stop_shake() -> void
Makes the camera stop shaking.
restore_default_limits
func restore_default_limits() -> void
Restores the limits of the camera to their default values