class_parallaxlayer.rst 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the ParallaxLayer.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_ParallaxLayer:
  6. ParallaxLayer
  7. =============
  8. **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. A parallax scrolling layer to be used with :ref:`ParallaxBackground<class_ParallaxBackground>`.
  13. Properties
  14. ----------
  15. +-------------------------------+------------------------------------------------------------------------+
  16. | :ref:`Vector2<class_Vector2>` | :ref:`motion_mirroring<class_ParallaxLayer_property_motion_mirroring>` |
  17. +-------------------------------+------------------------------------------------------------------------+
  18. | :ref:`Vector2<class_Vector2>` | :ref:`motion_offset<class_ParallaxLayer_property_motion_offset>` |
  19. +-------------------------------+------------------------------------------------------------------------+
  20. | :ref:`Vector2<class_Vector2>` | :ref:`motion_scale<class_ParallaxLayer_property_motion_scale>` |
  21. +-------------------------------+------------------------------------------------------------------------+
  22. Description
  23. -----------
  24. 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_property_scroll_offset>` value.
  25. This node's children will be affected by its scroll offset.
  26. Note that any changes to this node's position and scale made after it enters the scene will be ignored.
  27. Property Descriptions
  28. ---------------------
  29. .. _class_ParallaxLayer_property_motion_mirroring:
  30. - :ref:`Vector2<class_Vector2>` **motion_mirroring**
  31. +----------+----------------------+
  32. | *Setter* | set_mirroring(value) |
  33. +----------+----------------------+
  34. | *Getter* | get_mirroring() |
  35. +----------+----------------------+
  36. 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)``.
  37. ----
  38. .. _class_ParallaxLayer_property_motion_offset:
  39. - :ref:`Vector2<class_Vector2>` **motion_offset**
  40. +----------+--------------------------+
  41. | *Setter* | set_motion_offset(value) |
  42. +----------+--------------------------+
  43. | *Getter* | get_motion_offset() |
  44. +----------+--------------------------+
  45. The ParallaxLayer's offset relative to the parent ParallaxBackground's :ref:`ParallaxBackground.scroll_offset<class_ParallaxBackground_property_scroll_offset>`.
  46. ----
  47. .. _class_ParallaxLayer_property_motion_scale:
  48. - :ref:`Vector2<class_Vector2>` **motion_scale**
  49. +----------+-------------------------+
  50. | *Setter* | set_motion_scale(value) |
  51. +----------+-------------------------+
  52. | *Getter* | get_motion_scale() |
  53. +----------+-------------------------+
  54. Multiplies the ParallaxLayer's motion. If an axis is set to ``0`` it will not scroll.