2
0

ParallaxLayer.xml 1.4 KB

123456789101112131415161718192021222324
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ParallaxLayer" inherits="Node2D" version="4.0">
  3. <brief_description>
  4. A parallax scrolling layer to be used with [ParallaxBackground].
  5. </brief_description>
  6. <description>
  7. 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.
  8. This node's children will be affected by its scroll offset.
  9. [b]Note:[/b] Any changes to this node's position and scale made after it enters the scene will be ignored.
  10. </description>
  11. <tutorials>
  12. </tutorials>
  13. <members>
  14. <member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" default="Vector2(0, 0)">
  15. The ParallaxLayer's [Texture2D] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code], the [Texture2D] will not be mirrored.
  16. </member>
  17. <member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset" default="Vector2(0, 0)">
  18. The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset].
  19. </member>
  20. <member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale" default="Vector2(1, 1)">
  21. Multiplies the ParallaxLayer's motion. If an axis is set to [code]0[/code], it will not scroll.
  22. </member>
  23. </members>
  24. </class>