ParallaxLayer.xml 1.5 KB

12345678910111213141516171819202122232425262728
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ParallaxLayer" inherits="Node2D" version="3.3">
  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. <methods>
  14. </methods>
  15. <members>
  16. <member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" default="Vector2( 0, 0 )">
  17. 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.
  18. </member>
  19. <member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset" default="Vector2( 0, 0 )">
  20. The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset].
  21. </member>
  22. <member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale" default="Vector2( 1, 1 )">
  23. Multiplies the ParallaxLayer's motion. If an axis is set to [code]0[/code], it will not scroll.
  24. </member>
  25. </members>
  26. <constants>
  27. </constants>
  28. </class>