class_parallaxlayer.rst 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/ParallaxLayer.xml.
  6. .. _class_ParallaxLayer:
  7. ParallaxLayer
  8. =============
  9. **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A parallax scrolling layer to be used with :ref:`ParallaxBackground<class_ParallaxBackground>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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.
  15. This node's children will be affected by its scroll offset.
  16. \ **Note:** Any changes to this node's position and scale made after it enters the scene will be ignored.
  17. .. rst-class:: classref-reftable-group
  18. Properties
  19. ----------
  20. .. table::
  21. :widths: auto
  22. +-------------------------------+------------------------------------------------------------------------+---------------------+
  23. | :ref:`Vector2<class_Vector2>` | :ref:`motion_mirroring<class_ParallaxLayer_property_motion_mirroring>` | ``Vector2( 0, 0 )`` |
  24. +-------------------------------+------------------------------------------------------------------------+---------------------+
  25. | :ref:`Vector2<class_Vector2>` | :ref:`motion_offset<class_ParallaxLayer_property_motion_offset>` | ``Vector2( 0, 0 )`` |
  26. +-------------------------------+------------------------------------------------------------------------+---------------------+
  27. | :ref:`Vector2<class_Vector2>` | :ref:`motion_scale<class_ParallaxLayer_property_motion_scale>` | ``Vector2( 1, 1 )`` |
  28. +-------------------------------+------------------------------------------------------------------------+---------------------+
  29. .. rst-class:: classref-section-separator
  30. ----
  31. .. rst-class:: classref-descriptions-group
  32. Property Descriptions
  33. ---------------------
  34. .. _class_ParallaxLayer_property_motion_mirroring:
  35. .. rst-class:: classref-property
  36. :ref:`Vector2<class_Vector2>` **motion_mirroring** = ``Vector2( 0, 0 )``
  37. .. rst-class:: classref-property-setget
  38. - void **set_mirroring** **(** :ref:`Vector2<class_Vector2>` value **)**
  39. - :ref:`Vector2<class_Vector2>` **get_mirroring** **(** **)**
  40. 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.
  41. .. rst-class:: classref-item-separator
  42. ----
  43. .. _class_ParallaxLayer_property_motion_offset:
  44. .. rst-class:: classref-property
  45. :ref:`Vector2<class_Vector2>` **motion_offset** = ``Vector2( 0, 0 )``
  46. .. rst-class:: classref-property-setget
  47. - void **set_motion_offset** **(** :ref:`Vector2<class_Vector2>` value **)**
  48. - :ref:`Vector2<class_Vector2>` **get_motion_offset** **(** **)**
  49. The ParallaxLayer's offset relative to the parent ParallaxBackground's :ref:`ParallaxBackground.scroll_offset<class_ParallaxBackground_property_scroll_offset>`.
  50. .. rst-class:: classref-item-separator
  51. ----
  52. .. _class_ParallaxLayer_property_motion_scale:
  53. .. rst-class:: classref-property
  54. :ref:`Vector2<class_Vector2>` **motion_scale** = ``Vector2( 1, 1 )``
  55. .. rst-class:: classref-property-setget
  56. - void **set_motion_scale** **(** :ref:`Vector2<class_Vector2>` value **)**
  57. - :ref:`Vector2<class_Vector2>` **get_motion_scale** **(** **)**
  58. Multiplies the ParallaxLayer's motion. If an axis is set to ``0``, it will not scroll.
  59. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  60. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  61. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  62. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`