From a5c3696b3b18042f9cada5f76939db84cdb98886 Mon Sep 17 00:00:00 2001 From: Jerome67000 Date: Sun, 22 Oct 2017 19:55:22 +0200 Subject: [DOCS] ParallaxBackground and ParallaxLayer --- doc/classes/ParallaxBackground.xml | 8 +++++++- doc/classes/ParallaxLayer.xml | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml index a7d616129a..21b6150900 100644 --- a/doc/classes/ParallaxBackground.xml +++ b/doc/classes/ParallaxBackground.xml @@ -4,7 +4,7 @@ A node used to create a parallax scrolling background. - A ParallaxBackground will use one or more [ParallaxLayer] nodes to create a parallax scrolling background. Each [ParallaxLayer] can be set to move at different speeds relative to the camera movement, this can be used to create an illusion of depth in a 2D game. + A ParallaxBackground uses one or more [ParallaxLayer] child nodes to create a parallax effect. Each [ParallaxLayer] can move at a different speed using [member ParallaxLayer.motion_offset]. This creates an illusion of depth in a 2D game. If not used with a [Camera2D], you must manually calculate the [member scroll_offset]. @@ -108,16 +108,22 @@ + Base position offset of all [ParallaxLayer] children. + Base motion scale of all [ParallaxLayer] children. + If [code]true[/code] elements in [ParallaxLayer] child aren't affected by the zoom level of the camera. + Top left limits for scrolling to begin. If the camera is outside of this limit the background will stop scrolling. Must be lower than [member scroll_limit_end] to work. + Right bottom limits for scrolling to end. If the camera is outside of this limit the background will stop scrolling. Must be higher than [member scroll_limit_begin] to work. + The ParallaxBackground's scroll value. Calculated automatically when using a [Camera2D], but can be used to manually manage scrolling when no camera is present. diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml index 6cf5549c8f..8de7e05578 100644 --- a/doc/classes/ParallaxLayer.xml +++ b/doc/classes/ParallaxLayer.xml @@ -4,7 +4,8 @@ A parallax scrolling layer to be used with [ParallaxBackground]. - A ParallaxLayer must be the child of a [ParallaxBackground] node. All child nodes will be affected by the parallax scrolling of this layer. + 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 [member ParallaxBackground.scroll_offset] value. + This node's children will be affected by its scroll offset. @@ -60,10 +61,13 @@ + The ParallaxLayer's [Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code] the [Texture] will not be mirrored. Default value: [code](0, 0)[/code]. + The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset]. + Multiplies the ParallaxLayer's motion. If an axis is set to [code]0[/code] it will not scroll. -- cgit v1.2.3