class_parallaxlayer.rst 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the ParallaxLayer.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_ParallaxLayer:
  5. ParallaxLayer
  6. =============
  7. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. A parallax scrolling layer to be used with :ref:`ParallaxBackground<class_parallaxbackground>`.
  12. Member Variables
  13. ----------------
  14. .. _class_ParallaxLayer_motion_mirroring:
  15. - :ref:`Vector2<class_vector2>` **motion_mirroring** - The ParallaxLayer's :ref:`Texture<class_texture>` mirroring. Useful for creating an infinite scrolling background. If an axis is set to ``0`` the :ref:`Texture<class_texture>` will not be mirrored. Default value: ``(0, 0)``.
  16. .. _class_ParallaxLayer_motion_offset:
  17. - :ref:`Vector2<class_vector2>` **motion_offset** - The ParallaxLayer's offset relative to the parent ParallaxBackground's :ref:`ParallaxBackground.scroll_offset<class_ParallaxBackground_scroll_offset>`.
  18. .. _class_ParallaxLayer_motion_scale:
  19. - :ref:`Vector2<class_vector2>` **motion_scale** - Multiplies the ParallaxLayer's motion. If an axis is set to ``0`` it will not scroll.
  20. Description
  21. -----------
  22. A ParallaxLayer must be the child of a :ref:`ParallaxBackground<class_parallaxbackground>` node. Each ParallaxLayer can be set to move at different speeds relative to the camera movement or the :ref:`ParallaxBackground.scroll_offset<class_ParallaxBackground_scroll_offset>` value.
  23. This node's children will be affected by its scroll offset.