ParallaxBackground

A node used to create a parallax scrolling background.

A ParallaxBackground uses one or more ParallaxLayer child nodes to create a parallax effect. Each ParallaxLayer can move at a different speed using ParallaxLayer.motionOffset. This creates an illusion of depth in a 2D game. If not used with a Camera2D, you must manually calculate the scrollOffset.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

_cameraMoved
void _cameraMoved(Transform2D arg0, Vector2 arg1)
getLimitBegin
Vector2 getLimitBegin()
getLimitEnd
Vector2 getLimitEnd()
getScrollBaseOffset
Vector2 getScrollBaseOffset()
getScrollBaseScale
Vector2 getScrollBaseScale()
getScrollOffset
Vector2 getScrollOffset()
isIgnoreCameraZoom
bool isIgnoreCameraZoom()
opAssign
ParallaxBackground opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(ParallaxBackground other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
setIgnoreCameraZoom
void setIgnoreCameraZoom(bool ignore)
setLimitBegin
void setLimitBegin(Vector2 ofs)
setLimitEnd
void setLimitEnd(Vector2 ofs)
setScrollBaseOffset
void setScrollBaseOffset(Vector2 ofs)
setScrollBaseScale
void setScrollBaseScale(Vector2 scale)
setScrollOffset
void setScrollOffset(Vector2 ofs)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

scrollBaseOffset
Vector2 scrollBaseOffset [@property getter]
Vector2 scrollBaseOffset [@property setter]

Base position offset of all ParallaxLayer children.

scrollBaseScale
Vector2 scrollBaseScale [@property getter]
Vector2 scrollBaseScale [@property setter]

Base motion scale of all ParallaxLayer children.

scrollIgnoreCameraZoom
bool scrollIgnoreCameraZoom [@property setter]

If true elements in ParallaxLayer child aren't affected by the zoom level of the camera.

scrollIgnoreCameraZoom
bool scrollIgnoreCameraZoom [@property getter]

If true elements in ParallaxLayer child aren't affected by the zoom level of the camera.

scrollLimitBegin
Vector2 scrollLimitBegin [@property getter]
Vector2 scrollLimitBegin [@property setter]

Top left limits for scrolling to begin. If the camera is outside of this limit the background will stop scrolling. Must be lower than scrollLimitEnd to work.

scrollLimitEnd
Vector2 scrollLimitEnd [@property getter]
Vector2 scrollLimitEnd [@property setter]

Right bottom limits for scrolling to end. If the camera is outside of this limit the background will stop scrolling. Must be higher than scrollLimitBegin to work.

scrollOffset
Vector2 scrollOffset [@property getter]
Vector2 scrollOffset [@property setter]

The ParallaxBackground's scroll value. Calculated automatically when using a Camera2D, but can be used to manually manage scrolling when no camera is present.

Static functions

_new
ParallaxBackground _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta