Struct ParallaxLayer
A parallax scrolling layer to be used with ParallaxBackground
.
struct ParallaxLayer
;
A ParallaxLayer must be the child of a ParallaxBackground
node. Each ParallaxLayer can be set to move at different speeds relative to the camera movement or the ParallaxBackground
value.
This node's children will be affected by its scroll offset.
Note: Any changes to this node's position and scale made after it enters the scene will be ignored.
Properties
Name | Type | Description |
---|---|---|
motionMirroring [get, set]
|
Vector2 | The ParallaxLayer's Texture mirroring. Useful for creating an infinite scrolling background. If an axis is set to 0 , the Texture will not be mirrored.
|
motionOffset [get, set]
|
Vector2 | The ParallaxLayer's offset relative to the parent ParallaxBackground's ParallaxBackground .
|
motionScale [get, set]
|
Vector2 | Multiplies the ParallaxLayer's motion. If an axis is set to 0 , it will not scroll.
|
Methods
Name | Description |
---|---|
getMirroring
|
|
getMotionOffset
|
|
getMotionScale
|
|
setMirroring
|
|
setMotionOffset
|
|
setMotionScale
|